Monday, June 18, 2012

Deploy with capistrano an specific branch


To deploy with capistrano a different branch than the specified in the configuration (ex: master/HEAD) just use:
cap staging deploy -s branch=my_branch
It deploys my_branch into staging environment. If you are not using the multistage configuration see , it becomes
cap staging deploy -s branch=my_branch

If capistrano does not obey, check that in your deploy files (for each environment) you are getting the branch variable from the environment:

#in  config/deploy.rb and each for config/deploy/*
set :branch, fetch(:branch, "master")
 

Profit!

No comments:

Post a Comment