Skip to content

Commit 80064ff

Browse files
authored
Merge pull request #9 from launchdarkly/zs/add_release_script
new release script
2 parents 455c8ef + 77b692a commit 80064ff

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

script/release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
# This script updates the version for the ldclient library and releases it to RubyGems
3+
# It will only work if you have the proper credentials set up in ~/.gem/credentials
4+
5+
# It takes exactly one argument: the new version.
6+
# It should be run from the root of this git repo like this:
7+
# ./scripts/release.sh 4.0.9
8+
9+
# When done you should commit and push the changes made.
10+
11+
set -uxe
12+
echo "Starting ruby-client release."
13+
14+
VERSION=$1
15+
16+
#Update version in ldclient/version.py
17+
VERSION_RB_TEMP=./version.rb.tmp
18+
sed "s/VERSION =.*/VERSION = \"${VERSION}\"/g" lib/ldclient-rb/version.rb > ${VERSION_RB_TEMP}
19+
mv ${VERSION_RB_TEMP} lib/ldclient-rb/version.rb
20+
21+
# Build Ruby Gem
22+
gem build ldclient-rb.gemspec
23+
24+
# Publish Ruby Gem
25+
gem push ldclient-rb-${VERSION}.gem
26+
27+
echo "Done with ruby-client release"

0 commit comments

Comments
 (0)