Skip to content

balvig/version_master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VersionMaster
=============

A silly little tool for managing app versions heavily inspired by http://github.com/toland/app_version. 

How to use
==========

The plugin will copy the file version.yml into the config directory when installed.

# config/version.yml
---
major: 1
minor: 0
patch: 0

You can manage this manually or use the rake tasks below.

rake version:bump VER=patch   # ==> Bumped version 1.0.0 --> 1.0.1
rake version:bump VER=minor   # ==> Bumped version 1.0.1 --> 1.1.0
rake version:bump VER=major   # ==> Bumped version 1.1.0 --> 2.0.0
rake version:bump             # ==> Bumped version 2.0.0 --> 2.0.1
rake version:set VER=4.2.2    # ==> Changed version 2.0.1 --> 4.2.2
rake version                  # ==> Current version is 4.2.2

You can also use the Capistrano recipe below to update versions when deploying.

cap deploy:bump               # Updates patch number and uploads version.yml to the server.
cap deploy:bump VER=minor     # Updates minor version number and uploads version.yml to the server.

Use the constant APP_VERSION in your views or elsewhere to display the current version.

Example: 
<p>My App v.<%=APP_VERSION%></p> # ==> <p>My App v.4.2.2</p>

Installation
============

script/plugin install git://github.com/balvig/version_master.git

Copyright (c) 2009 Jens Jakob Balvig, released under the MIT license