-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from launchdarkly/zs/add_release_script
new release script
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |