Automagically tag your current deployed release with capistrano
$ gem install capistrano-tagging
or in your Gemfile
gem 'capistrano-tagging', :github => 'marcelopazzo/capistrano-tagging', :require => false
In Capfile
:
require 'capistrano/tagging'
That's it! You can specify format of tag:
set :tagging_format, ':rails_env_:release' # default, also available all of deploy variables
You can also specify a different remote
set :tagging_remote, 'origin' # default
Or if you need to tag just a specific branch
set :tagging_environments, %w(production) # If not specified, it will tag every deploy