Skip to content

Commit 79176f6

Browse files
author
Jerry Cheung
committed
release script cc @pengwynn
1 parent d8c7deb commit 79176f6

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,7 @@ This section is for gem maintainers to cut a new version of the gem.
287287

288288
* update lib/html/pipeline/version.rb to next version number X.X.X following [semver](http://semver.org).
289289
* update CHANGELOG.md. Get latest changes with `git log --oneline vLAST_RELEASE..HEAD | grep Merge`
290-
* on the master branch, run:
291-
292-
```sh
293-
$ git commit -m "bump vX.X.X"
294-
$ git tag vX.X.X
295-
$ git push origin master
296-
$ git push --tags
297-
$ gem build html-pipeline.gemspec
298-
$ gem push html-pipeline-X.X.X.gem
299-
```
290+
* on the master branch, run `script/release`
300291

301292
## Contributing
302293

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/gem
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)