문제

I have this block in the deploy namespace:

 if :stage != :development then
    before :check, 'deploy:open'
    after :restart, 'deploy:close'
  end  

however, this is not working. Is there a way to exclude tasks from a given stage?

도움이 되었습니까?

해결책

With Capistrano 3, you are supposed to use fetch to get a variable.

if fetch(:stage) != :development

should work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top