versionator
Version management for your Rails 3 app. 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 to github
Install
Add to your Gemfile
gem 'versionator'
Install with bundler
$ bundle install
Github
Versionator pushes the git tag and VERSION file to your project’s github 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 pull
-
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
Usage
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 to github Example: v1.1.1 moves to v1.1.2
bundle exec rake versionator:patch
Bump a minor version, git tag and push to github Example: v1.1.1 moves to v1.2.0
bundle exec rake versionator:minor
Bump a major version, git tag and push to github Example: v1.1.1 moves to v2.0.0
bundle exec rake versionator:major
Contributing to versionator
-
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.
*** Tests are located in a separate repository, since their needs to be a project to tag against. Here is the test repo: github.com/johnmcaliley/test_app
Copyright
Copyright © 2011 John McAliley. See LICENSE.txt for further details.