Skip to content

Commit

Permalink
Adding release procedures to huborg
Browse files Browse the repository at this point in the history
In a community based project, there are many moving parts. I wanted to
be clear about the steps used in releasing Huborg. The grant/revoke of
gem authority is something that can get sticky if you were commit a
bumped version and run `rake release`. You'll have tagged a release,
pushed to github, but not rubygems.

~enhancement
  • Loading branch information
jeremyf authored and jrgriffiniii committed Feb 28, 2020
1 parent 4fe2111 commit 8f25486
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,31 @@ documentation.
The above process will generate documentation in `./doc`. Open `./doc/index.html`
in your browser. (On OSX, try `open ./doc/index.html`).

## Releasing Huborg

Huborg uses [Semantic Versioning](https://semver.org/).

Below is the checklist:

- [ ] An internet connection
- [ ] A [Github Access Token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/)
- [ ] Your access token exported to `ENV["CHANGELOG_GITHUB_TOKEN"]`
- [ ] Verify you are a [huborg gem owner](https://rubygems.org/gems/huborg). If not, Samvera uses
[`grant_revoke_gem_authority`](https://github.com/samvera/maintenance/blob/master/script/grant_revoke_gem_authority.rb)
to manage the gem owners.
- [ ] Verify that you can push changes to https://github.com/samvera-labs/huborg
- [ ] Check that you have a clean git index
- [ ] Pull down the latest version of master
- [ ] Update the Huborg::VERSION (in ./lib/huborg/version.rb); Remember, huborg
uses [Semantic Versioning](https://semver.org). (_**NOTE:** Do not commit the version change_)
- [ ] Run `bundle exec rake changelog` to generate [CHANGELOG.md](./CHANGELOG.md)
- [ ] Review the new Huborg::VERSION CHANGELOG.md entries as they might prompt
you to consider a different version (e.g. what you thought was a bug fix
release is in fact a minor version release). Look at the changelog from
the perspective of a person curious about using this gem.
- [ ] Commit your changes with a simple message: "Bumping to v#{Huborg::VERSION}"
- [ ] Run `bundle exec rake release`

# Acknowledgments

This software has been developed by and is brought to you by the Samvera community. Learn more at the
Expand Down
18 changes: 18 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,21 @@ namespace :test do
client.synchronize_mailmap!(template: ENV.fetch("MAILMAP_TEMPLATE_FILENAME"))
end
end


require 'github_changelog_generator/task'
desc "Generate CHANGELOG.md based on lib/huborg/version.md (change that to the new version before you run rake changelog)"
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
begin
ENV.fetch("CHANGELOG_GITHUB_TOKEN")
rescue KeyError
$stderr.puts %(To run `rake changelog` you need to have a CHANGELOG_GITHUB_TOKEN)
$stderr.puts %(set in ENV. (`export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"`))
exit!(1)
end
config.user = 'samvera-labs'
config.project = 'huborg'
config.since_tag = 'v0.1.0' # The changes before v0.1.0 were not as helpful
config.future_release = %(v#{ENV.fetch("FUTURE_RELEASE", Huborg::VERSION)})
config.base = 'CHANGELOG.md'
end
1 change: 1 addition & 0 deletions huborg.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
spec.add_dependency "octokit", "~> 4.16"
spec.add_dependency "git", "~> 1.6"
spec.add_development_dependency "byebug"
spec.add_development_dependency "github_changelog_generator"
end

0 comments on commit 8f25486

Please sign in to comment.