Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Release Steps

Adam Michael edited this page Aug 25, 2015 · 2 revisions

Release Steps

Hello future maintainer! If you're reading this, I'm going to assume you already have Ruby installed, the repo cloned and a (at least minimal) understanding of the code base.

TLDR:

  1. bundle exec rake spec.

  2. gem build adal.gemspec.

  3. gem push adal-x.y.z.gem. This requires RubyGems credentials.

  4. Create a new release in GitHub, tag it as vX.Y.Z and upload adal-x.y.z.gem as an attachment.

Full version

Ruby gems (including this one) are generally hosted at https://rubygems.org. This is where gem, bundle and all other Ruby tools that deal with dependency management look for gems. There are a few steps you will have to undertake to get the latest, greatest code available to the public on RubyGems.

First, make sure you are on the master branch. We should only ever submit gems that are built off of the master branch.

Before you proceed, you should ensure that all the tests pass. bundle exec rake spec will fetch all the dependencies (if you don't already have them) and run the test suite. This will also inform you of the test coverage percentage. This should be at a reasonable level.

Next, make sure that the version number is correct. You may notice that adal.gemspec includes the line s.version = ADAL::Version. This is calling the to_s method on the class ADAL::Version which is defined in lib/adal/version.rb. You will want to update the MAJOR, MINOR and UPDATE constants there.

Now you can build the Gem with gem build adal.gemspec. Note that this is not the same as compiling. You will not be alerted of syntax errors or anything in the code. This is why we have tests.

You should now have a file called adal-x.y.z.gem with the appropriate values of x, y and z. This is what is uploaded to RubyGems. You upload it with the command gem push adal-x.y.z.gem. This will require credentials. In order for the push to succeed, you must be listed as an owner of the gem on RubyGems. At the time of writing, it is undecided who will have this priviledge.

If you've reached this point, the code is live. There is no going back now. If you messed up, you can "yank" the gem from RubyGems, but you cannot reuse the version number. (Yanking also looks super super bad, please don't do it.)

By convention, you should mark the current state of the codebase as a release on GitHub. To do this, go to the Releases tab of the repo and select "Create a new release". Tag it with the version number and upload adal-x.y.z.gem as an attachment.

Congrats, you're done!

- Adam

Clone this wiki locally