Quantcast
Channel: capistrano - There's an echo in my head
Viewing all articles
Browse latest Browse all 15

Capistrano3のタスクの中からエラーを投げる

$
0
0

capistrano-pending gemREVISIONファイルが無いときにエラーで終わらせたくてCapistranoのコードを読んでみたら、次のようにしてた:

if test "[ -f #{current_path}/REVISION ]"# ファイルが存在した場合の処理else
  error "REVISION file doesn't exist"exit1end

Abort when REVISION file doesn't exist · abf81bd · a2ikm/capistrano-pending · GitHub

こんな風にしておくとREVISIONファイルがないときに次のようにエラー表示がされてそこでタスクが終了する。


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>