Easy version management for Rails apps using VersionMaster and Capistrano
Posted in: Work
Working on the new version of subdelay.com I came up with a couple of plugins for Rails that although functionality-wise are dirt simple turned out to be rather useful. Therefore I have decided to open source them on GitHub and also do a little writeup here on the blog.
VersionMaster
First up is VersionMaster. I needed a simple way to manage a version number (eg. “v1.0.8″ etc) for the site, in order to keep track of minor and major updates as I changed things around and added new features. More importantly, I wanted to have this happen automatically whenever I deployed a new release using Capistrano. I first took a look at toland’s app_version but it didn’t quite do what I needed so I came up with my own little implementation.
Using VersionMaster
Install the plugin using
script/plugin install git://github.com/balvig/version_master.git
The file “version.yml” will be copied into the config directory:
You can edit this file to manually set the version number or use the rake tasks below:
You can also use the built-in Capistrano recipe to update versions when deploying (which is how I use it):
You can then use the constant APP_VERSION in your views or elsewhere to display the current version.















2 Responses to “Easy version management for Rails apps using VersionMaster and Capistrano”
February 16th, 2010 at 10:04 am
[...] 最近開発したバーション番号管理のRailsプラグインがThe Ruby Showというポッドキャストで紹介されました。 [...]
February 18th, 2010 at 1:15 am
[...] Easy version management for Rails apps using VersionMaster and Capistrano, nice [...]
Leave a Reply