Skip to content

Commit 77e28cf

Browse files
committed
Merge pull request #148 from ruby-ldap/release-scripts
[Proposal] New release process
2 parents f79c5e8 + e736f24 commit 77e28cf

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

README.rdoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ sources.
3737

3838
Simply require either 'net-ldap' or 'net/ldap'.
3939

40+
== Release
41+
42+
This section is for gem maintainers to cut a new version of the gem.
43+
44+
* Update lib/html/pipeline/version.rb to next version number X.X.X following {semver}(http://semver.org/).
45+
* Update CHANGELOG.md. Get latest changes with `git log --oneline vLAST_RELEASE..HEAD | grep Merge`
46+
* On the master branch, run `script/release`
47+
4048
:include: Contributors.rdoc
4149

4250
:include: License.rdoc

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)