streamlining release cycles with git (version-bump|release)

Posted by Katie McLaughlin on May 7, 2014

Nearly everyone who develops something in and releases it knows how versioning is supposed to work. Some might even use Semantic Versioning. However, there's no really nice way in git to do such things. On top of that, the github way to releasing things is to use additional attributes to existing tags, in order to include a name and information about a specific release. Both things are not able to be done within git core. Until now.

The illustrious mpalmer has developed a set of Ruby gems that can natively extend git to do versioning and releases to github. They are:

https://github.com/mpalmer/git-version-bump

and

https://github.com/mpalmer/github-release

With git version-bump, you can in one line bump your code by a patch, minor version, or major version. This gem has been around for a few months now. However, the recently created git release allows the extension of this. By using the -n parameter you can add a title and body to your tag as an annoation, much in the same way you add a summary and body to a git commit.

Using git release, it takes your github credentials, generates a one time key, and using the github api, takes the annotated tag and turns it into a nicely formatted github release. Indeed, the first release of github-release was released entirely using the gem itself. Nifty!