Skip to content

Commit

Permalink
Merge pull request #9 from launchdarkly/zs/add_release_script
Browse files Browse the repository at this point in the history
new release script
  • Loading branch information
zsiddique authored Jul 26, 2017
2 parents 455c8ef + 77b692a commit 80064ff
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions script/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# This script updates the version for the ldclient library and releases it to RubyGems
# It will only work if you have the proper credentials set up in ~/.gem/credentials

# 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 ruby-client release."

VERSION=$1

#Update version in ldclient/version.py
VERSION_RB_TEMP=./version.rb.tmp
sed "s/VERSION =.*/VERSION = \"${VERSION}\"/g" lib/ldclient-rb/version.rb > ${VERSION_RB_TEMP}
mv ${VERSION_RB_TEMP} lib/ldclient-rb/version.rb

# Build Ruby Gem
gem build ldclient-rb.gemspec

# Publish Ruby Gem
gem push ldclient-rb-${VERSION}.gem

echo "Done with ruby-client release"

0 comments on commit 80064ff

Please sign in to comment.