Skip to content

Commit e05d240

Browse files
committed
Add script for automating gem release
1 parent 3de1b52 commit e05d240

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

gemrelease.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
# Automates the multi-step release process
3+
# Tags master branch and publishes gem to rubygems.org
4+
# TODO: Publish docs (instigate build/deploy of LDCMF guides)
5+
#
6+
# This script is to be run after the dev branch has been merged to
7+
# the master branch
8+
#
9+
# Usage: ./gemrelease.sh 0.11.0
10+
11+
if [ -z "$1" ] ; then
12+
echo "Add the release version number: $0 <version>"
13+
exit 1
14+
fi
15+
16+
version=$1
17+
shift
18+
19+
git checkout master
20+
git pull origin master
21+
rake install
22+
gem push pkg/liquidoc-$version.gem
23+
git tag -a v$version -m "Release $version"
24+
git push origin --tags
25+
echo "✔ Release pushed to RubyGems.org"
26+
echo "Don't forget to manually post the release on GitHub:"
27+
echo "https://github.com/DocOps/liquidoc-gem/releases/new"
28+
exit 0

0 commit comments

Comments
 (0)