Create/Update the application version file of your Rails app and automatically create the git tag.
Prerequisite
- Rails application
- Gems support comming soon!
Installation
Add this line to your application's Gemfile:
gem 'auto_tag_version'
When you need to create a tag:
$ rake autotag TAG=10.24.5
How it works
Considering you application name is "TestAPP", this code above will create a file in "test_app/config/initializers/app_version.rb" with the content like:
module TestAPP
VERSION = 10.24.5
end
And the file will be automatically commited and the git tag created. (You need to push it manually!)
You can access the version number of your application using "TestAPP::VERSION"
Contributing
First of all, thank you for wanting to help!
- Fork it.
- Create a feature branch -
git checkout -b more_magic
- Add tests and make your changes
- Check if tests are ok -
rake spec
- Commit changes -
git commit -am "Added more magic"
- Push to Github -
git push origin more_magic
- Send a pull request! ❤️