Gavin Morrice

is a web and iOS developer from Edinburgh, Scotland.

more about me ยป

Manage your application version using per-version

At the moment my team are working on a client application that's gaining more and more public support.

Part of the contract between them and their business clients is regular software updates that are well documented and broadcast amongst the network of paying clients.

To make maintaining the application version easier I bundled together a simple Ruby gem that provides everything required to document versions.

Installation

Installing is straight-forward: add per-version to your Gemfile and then run bundle install.

# Gemfile

gem "per-version"

Once installed, you'll have to run this generator script:

$ rails g version_file

That will stick a file named VERSION in the root directory of your application which looks like this:

VERSION = "0.0.1"

Show current version

So anytime you're working away and you want to know the current working version of your application run rake version:show

$ Current Version: 2.0.1

Release a new version

Once you've added a bunch of awesome features and want to launch a new version.

  1. Make sure your git commits are up to date.
  2. Change VERSION to show the next version number.
  3. git commit -am "Updated version for new release"
  4. rake version:release

Simples!

The gem is still in it's infancy so I'd appreciate all/any feedback

To bring yourself up-to-date on semantic versioning check out Semver: Semantic Versioning