Tagistrano

Automatically generate version-based git tags on Capistrano deploys.

This gem assumes you are using a X.X.X (major.minor.patch) version tag strategy. Once set up, you will be prompted to choose a new tag every time a cap task is run. The options will be generated by incrementing the highest existing version tag.

For example, if your project's current tag is 1.2.3, the prompt will look like this:

Tag: (leave blank to skip tagging)
1. Major 2.0.0
2. Minor 1.3.0
3. Patch 1.2.4

Allowing you to easily bump your project version, or skip tagging if no new version is required.

Installation

Add this line to your application's Gemfile:

gem 'tagistrano'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tagistrano

Finally, add the following line to your Capfile:

require 'tagistrano'

Usage

Call the following method wherever you want the tag prompt to show:

tag_release

This can be called in several places:

  • In your deploy.rb file, to prompt on every cap task
  • If using multiple stages, in individual stage files, to prompt on every cap task for that stage
  • In cap tasks, to only prompt for that specific task

License

The gem is available as open source under the terms of the MIT License.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About Foraker Labs

This project is maintained by Foraker Labs. The names and logos of Foraker Labs are fully owned and copyright Foraker Design, LLC.

Foraker Labs is a Boulder-based Ruby on Rails and iOS development shop. Please reach out if we can help build your product.