Skip to content

Commit 9701f3f

Browse files
authored
Add release script (#60)
1 parent 23489a5 commit 9701f3f

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

RELEASE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Releasing a new version of checkr-official
2+
3+
## Release process
4+
5+
1. Create a list of all the changes since the prior release
6+
1. Compare the latest release to master using
7+
https://github.com/checkr/checkr-ruby/compare/`${latest}`...master
8+
1. Open the linked pull requests from all the `Merge pull request #...` commits
9+
1. For all non-documentation PRs, copy title (including pull request number)
10+
into markdown list items
11+
1. Sort into logical buckets, like "New", "Improvement", "Fix"
12+
1. Reorganize to put the pull request number at the end of the line with author in parenthesis
13+
1. Ensure there are no breaking changes, or if there are breaking changes you'll need to bump
14+
the major version, following [SemVer](https://semver.org/)
15+
1. Update the version
16+
1. Update the constant in `lib/checkr/version.rb`
17+
1. Commit and push to your branch
18+
1. Get it reviewed and merge to master
19+
1. Move to master branch and pull last version
20+
1. Run the `bin/release` script to cut a release

bin/release

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
# Usage: bin/release
3+
# Build the gem, tag master, push it to origin, and then release the package on RubyGems.
4+
5+
set -e
6+
7+
branch="$(git rev-parse --abbrev-ref HEAD)"
8+
[ "$branch" = "master" ] ||
9+
(echo "You are not on master. First push your branch, get your PR reviewed, merge it on Github. "\
10+
"Then locally move to master and pull last changes." && exit 1)
11+
12+
version="$(gem build *.gemspec | grep Version: | awk '{print $2}')"
13+
[ -n "$version" ] || (echo "Version needs to be a number" && exit 1)
14+
15+
echo $version
16+
git tag "v$version"
17+
git push origin "v$version"
18+
gem push *-${version}.gem

0 commit comments

Comments
 (0)