开发者

Adding actions to Capistrano tasks

开发者 https://www.devze.com 2023-03-22 11:41 出处:网络
How can I add something to Capistrano\'s deploy task开发者_JAVA技巧? I need to create a symlink in \"public\" directory.Create a new task to create the symlink, then use a hook to add your task into t

How can I add something to Capistrano's deploy task开发者_JAVA技巧? I need to create a symlink in "public" directory.


Create a new task to create the symlink, then use a hook to add your task into the Capistrano deploy workflow where appropriate.

e.g.

namespace :deploy do
  desc "symlink my file"
  task :symlink_file, :roles => :app do
    run "ln -s file public/file"
  end
end

after 'deploy:update_code', 'deploy:symlink_file'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号