A Capistrano tasks for generating a semantic version Git tag at each deployment.
- Capistrano 3
- Git 2.1+
capistrano-semver-git-tags is available on rubygems.org.
In keeping with the pattern used by Capistrano itself and other plugins, add it
to the development group of your Gemfile with require: false:
# Gemfile
group :development do
gem 'capistrano-semver-git-tags', '~> 0.1.0', require: false
endThen require capistrano/semver-tag in your Capfile
# Capfile
require 'capistrano/semver-tag'
This will allow you to use one of three tasks:
For bug fixes
bundle exec cap production deploy:patchFor new features
bundle exec cap production deploy:minorFor major changes that break backward compatibility
bundle exec cap production deploy:major