Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Richelson committed Jul 21, 2017
1 parent 0b5b828 commit 808b935
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# This script updates the version for the ldclient-node SDK

# It takes exactly one argument: the new version.
# It should be run from the root of this git repo like this:
# ./scripts/release.sh 4.0.9

# When done you should commit and push the changes made.

set -uxe
echo "Starting node-client release."

VERSION=$1
npm --version

# Update version in package.json
# We're intentionally not running 'npm version' because it does a git commit, which interferes
# with other parts of this automated release process.

# Update version in setup.py
PACKAGE_JSON_TEMP=./package.json.tmp
sed "s/\"version\".*/\"version\": \"${VERSION}\",/g" package.json > ${PACKAGE_JSON_TEMP}
mv ${PACKAGE_JSON_TEMP} package.json
npm publish

echo "Done with node-client release"

0 comments on commit 808b935

Please sign in to comment.