部署命名空间中有这个块:
if :stage != :development then
before :check, 'deploy:open'
after :restart, 'deploy:close'
end 然而,这是行不通的。是否有办法将任务排除在给定的阶段之外?
发布于 2014-01-29 22:40:48
对于Capistrano 3,您应该使用fetch来获得一个变量。
if fetch(:stage) != :development应该行得通。
https://stackoverflow.com/questions/21444099
复制相似问题