سؤال

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