build_number
Creates a .build_number
file in your current directory which will store and increment the BUILD_NUMBER
environment variable. This is useful when you want to keep track of build numbers outside of a continuous integration
environment.
If the BUILD_NUMBER
variable is already set, it will not be incremented.
Installation
Add this line to your application's Gemfile:
gem 'build_number'
And then execute:
$ bundle
Or install it yourself as:
$ gem install build_number
Usage
In your project's Rakefile:
require 'build_number'
BuildNumber.set_env
# ENV['BUILD_NUMBER'] is now set and incremented for the next build!
Contributing
- Fork it ( https://github.com/scardetto/build_number/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request