Change the branch that switches after deployment

I have Capistrano deploying a branch devin a staging environment

# capistrano/config/deploy.rb
set :branch, fetch(:branch, "dev")

However, once the deployment is complete, it moves the code base to a branch named deploy

$ git branch
* deploy
  dev

How to configure Capistrano to switch to another branch, for example staging? Or is there a way to make him stay on a branch dev?

I could not find any information in the capistrano readme file or in the source code.

+4
source share
1 answer

, . , . , , .

#call with cap -s env="<env>" branch="<branchname>" deploy
set :branch, fetch(:branch, "master")
set :env, fetch(:env, "production")
0

Source: https://habr.com/ru/post/1542960/


All Articles