开发者

Adding actions to Capistrano tasks

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜