diff --git a/README.rdoc b/README.rdoc index 969a717a..0a1ebdf5 100644 --- a/README.rdoc +++ b/README.rdoc @@ -37,6 +37,14 @@ sources. Simply require either 'net-ldap' or 'net/ldap'. +== Release + +This section is for gem maintainers to cut a new version of the gem. + +* Update lib/html/pipeline/version.rb to next version number X.X.X following {semver}(http://semver.org/). +* Update CHANGELOG.md. Get latest changes with `git log --oneline vLAST_RELEASE..HEAD | grep Merge` +* On the master branch, run `script/release` + :include: Contributors.rdoc :include: License.rdoc diff --git a/script/package b/script/package new file mode 100755 index 00000000..5851400e --- /dev/null +++ b/script/package @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Usage: script/package +# Updates the gemspec and builds a new gem in the pkg directory. + +mkdir -p pkg +gem build *.gemspec +mv *.gem pkg diff --git a/script/release b/script/release new file mode 100755 index 00000000..6dcd8cb3 --- /dev/null +++ b/script/release @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Usage: script/release +# Build the package, tag a commit, push it to origin, and then release the +# package publicly. + +set -e + +version="$(script/package | grep Version: | awk '{print $2}')" +[ -n "$version" ] || exit 1 + +echo $version +git commit --allow-empty -a -m "Release $version" +git tag "v$version" +git push origin +git push origin "v$version" +gem push pkg/*-${version}.gem