2012-10-04 30 views

回答

1

在Capistrano 3中,您可以將--trace選項添加到cap命令以查看所有涉及的任務。它沒有很好的格式,但它可以幫助你更好地瞭解發生的事情。

例如:

$ cap production deploy --trace 
** Invoke production (first_time) 
** Execute production 
** Invoke load:defaults (first_time) 
** Execute load:defaults 
** Invoke bundler:map_bins (first_time) 
** Execute bundler:map_bins 
** Invoke deploy:set_rails_env (first_time) 
** Execute deploy:set_rails_env 
** Invoke deploy:set_rails_env 
** Invoke deploy (first_time) 
** Execute deploy 
** Invoke deploy:starting (first_time) 
** Execute deploy:starting 
** Invoke deploy:check (first_time) 
** Execute deploy:check 
** Invoke git:check (first_time) 
** Invoke git:wrapper (first_time) 
** Execute git:wrapper 
... 

如果使用Capistrano的3,你也可以嘗試安裝我airbrussh寶石,提高Capistrano的輸出格式顯示,除其他事項外,每個任務的名稱它正在執行。根據我的經驗,airbrussh使得更容易理解各種任務在做什麼。

+0

...並添加'--dry-run'來查看此跟蹤而不實際部署。 – bjnord

相關問題