Skip to content

Commit 9beddcf

Browse files
author
Jerry Cheung
committed
add release scripts
1 parent d06d677 commit 9beddcf

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

script/package

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# Usage: script/package
3+
# Updates the gemspec and builds a new gem in the pkg directory.
4+
5+
mkdir -p pkg
6+
gem build *.gemspec
7+
mv *.gem pkg

script/release

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# Usage: script/release
3+
# Build the package, tag a commit, push it to origin, and then release the
4+
# package publicly.
5+
6+
set -e
7+
8+
version="$(script/package | grep Version: | awk '{print $2}')"
9+
[ -n "$version" ] || exit 1
10+
11+
echo $version
12+
git commit --allow-empty -a -m "Release $version"
13+
git tag "v$version"
14+
git push origin
15+
git push origin "v$version"
16+
gem push pkg/*-${version}.gem

0 commit comments

Comments
 (0)