Skip to content

Commit 2cf3b75

Browse files
committed
Improve script/release
Now handles creating the release commit
1 parent 6326b6c commit 2cf3b75

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

script/release

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
#!/usr/bin/env bash
2+
# Edit the version string in the gemspec, then execute this script to:
3+
#
4+
# 1. Commit the version change
5+
# 2. Tag the release
6+
# 3. Push the tag and the current branch to GitHub
7+
# 4. Publish the gem to RubyGems
8+
#
29
set -e
310

411
gem build *.gemspec | awk '/Name:|Version:|File:/ { print $2 }' | xargs | {
512
read gem_name gem_version gem_file
613
trap "rm -rf $gem_file" INT EXIT
14+
15+
bundle install
16+
script/test
17+
18+
git commit -m "$gem_name $gem_version" -- *.gemspec Gemfile*
719
git tag "v${gem_version}"
20+
821
git push origin HEAD "v${gem_version}"
922
gem push "$gem_file"
1023
}

0 commit comments

Comments
 (0)