This Gem provides versioning helpers your Ruby on Rails Application.
Following rake tasks will be added to your project:
rake version:init # create CHANGELOG.md and DEPLOYMENT.md Files
rake version:bump # Bump current version to supplied VERSION='x.x.x'
rake version:show # show current versionAdd this line to your application's Gemfile:
gem 'versioning', git: "git@github.com:semabit/versioning.git"And then execute:
$ bundle
First you need to create the version file under config/initializers/version.rb:
module YourApplication
module Application
VERSION = 'x.x.x'
NAME = 'Your custom Application name' # this line is optional (see below)
end
endNAME constant is used in CHANGELOG and DEPLOYMENT files (in titles).
If the NAME constant is not specified, the parent module name of the application is formed into a humanized name. Per example:
YourApplication is turned into: Your Application
Now execute version:init with:
$ rails version:init
This will create the versioning files (CHANGELOG.md, DEPLOYMENT.md) where you log the changes.
Once you're ready to bump the app version, just do:
$ rails version:bump VERSION='your.new.version'
This will update your version.rb file as well as the CHANGELOG.md and DEPLOYMENT.md files.