Skip to content

Instantly share code, notes, and snippets.

@yyandrew
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save yyandrew/103149b38e296169b5c0 to your computer and use it in GitHub Desktop.

Select an option

Save yyandrew/103149b38e296169b5c0 to your computer and use it in GitHub Desktop.
1.cap staging deploy -s branch=1626d55d3da9
2.cap staging deploy:rollback #rollback to the previous version
3.添加新的任务-显示服务器当前的代码版本号。在config/deploy.rb文件添加如下代码
namespace :deploy do
desc 'Show deployed version'
task :revision do
on roles(:app) do
execute "echo current version is------------------"
execute "cat #{current_path}/REVISION"
execute "echo end----------------"
end
end
end
运行cap staging deploy:version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment