Additions that can be pulled into your capistrano 3 setup.
Add this line to your Rails application's Gemfile, inside the :development
group:
gem 'cap3_addons'
And then execute:
$ bundle
This gem provides different pieces of functionality that is each being made
available by loading a Rake file from you deploy.rb
and using the provided tasks.
This way, when new components are added to this gem, they will not interfere with you existing
workflow.
The added tasks can be made dependencies of existing tasks, or after
hooks can be used for them.
Some tasks require additional configuration. See the following sections for details.
Load the rake file:
load 'cap3_addons/tasks/deploytags.rake'
Then, configure these tasks to be run:
after :deploy, "deploytags:tag"
after :deploy, "deploytags:clean"
When cleaning tags, some hard-coded assumptions are made about how many tags and from what time you want to keep. Tags considered obsolete are removed locally and from the remote "origin".
Known issues: very noisy.
Load the rake file:
load 'cap3_addons/tasks/checkbranch.rake'
Then, configure these tasks to be run:
before :deploy, :checkbranch
Comparison is done against the same branch in the "origin" remote.
- Fork it ( https://github.com/[my-github-username]/cap3_addons/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request