Version management for your Rails app (2 or higher). Provides a VERSION text file and rake tasks to bump patch, minor, and major versions. This will create a git tag, commit the new VERSION file and push the tag & VERSION.
Add to your Gemfile
Install with bundler
$ bundle install
For Rails 2 (or anything other than Rails 3+), add to your Rakefile
RailsAppVersioning pushes the git tag and VERSION file to your project's git repository (origin master) each time you run the rake tasks. It is recommended that you commit all code and push to master before bumping your version.
Order of execution for the rake tasks:
Bump the version locally based on the version in /your_app/VERSION
Write the new version to /your_app/VERSION
git checkout master
git tag new version
git commit (This will commit your new VERSION file)
git push (new tag and VERSION file)
TODO: Currently there is no error checking in place for each of these automated steps. The rake tasks should be changed to stop execution if there is code to be committed or new code from the pull
There are 3 rake tasks for each version category. If the VERSION file does not exist in the app root directory, the rake task will create it automatically
Bump a patch version, git tag and push Example: v1.1.1 moves to v1.1.2
bundle exec rake version:patch
Bump a minor version, git tag and push Example: v1.1.1 moves to v1.2.0
bundle exec rake version:minor
Bump a major version, git tag and push Example: v1.1.1 moves to v2.0.0
bundle exec rake version:major
Contributing to rails_app_versioning
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
Fork the project
Start a feature/bugfix branch
Commit and push until you are happy with your contribution
Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Add the test_repo submodules
git submodule update --init
Change to either test directory, and run the rake commands
cd test_app rake -T # You should see the version tasks rake version:minor # Try it out
Copyright © 2011 John McAliley and 2013 SciMed Solutions, Inc. See LICENSE.txt for further details.