capistrano を実行するとき、いつもドキドキする

capistranoを会社のRailsアプリのデプロイ用に使っているが、いつもドキドキする。

実行した後に、実行してもよいかどうかの確認があってもいいなぁと思うのだけど。

と思ったので、helpを見てみた。capistranoのバージョンはちょっと古目で1.3.0。

Usage: cap [options] [args]

Recipe Options -----------------------

    -a, --action ACTION              An action to execute. Multiple actions may
                                     be specified, and are loaded in the given order.
    -c, --caprc FILE                 Specify an alternate personal config file to load.
                                     (Default: /home/admin/.caprc)
    -f, --file FILE                  A recipe file to load. Multiple recipes may
                                     be specified, and are loaded in the given order.
    -p, --password [PASSWORD]        The password to use when connecting. If the switch
                                     is given without a password, the password will be
                                     prompted for immediately. (Default: prompt for password
                                     the first time it is needed.)
    -r, --recipe RECIPE              A recipe file to load. Multiple recipes may
                                     be specified, and are loaded in the given order.
                                     (This option is deprecated--please use -f instead)
    -s, --set NAME=VALUE             Specify a variable and it's value to set. This
                                     will be set after loading all recipe files.
    -S, --set-before NAME=VALUE      Specify a variable and it's value to set. This
                                     will be set BEFORE loading all recipe files.
    -x, --skip-config                Disables the loading of the default personal config
                                     file. Specifying -C after this option will reenable
                                     it. (Default: config file is loaded)

Framework Integration Options --------

    -A, --apply-to DIRECTORY         Create a minimal set of scripts and recipes to use
                                     capistrano with the application at the given
                                     directory. (Currently only works with Rails apps.)

Miscellaneous Options ----------------

    -h, --help                       Display this help message
    -P, --[no-]pretend               Run the task(s), but don't actually connect to or
                                     execute anything on the servers. (For various reasons
                                     this will not necessarily be an accurate depiction
                                     of the work that will actually be performed.
                                     Default: don't pretend.)
    -q, --quiet                      Make the output as quiet as possible (the default)
    -v, --verbose                    Specify the verbosity of the output.
                                     May be given multiple times. (Default: silent)
    -V, --version                    Display the version info for this utility

You can use the --apply-to switch to generate a minimal set of capistrano
scripts and recipes for an application. Just specify the path to the application
as the argument to --apply-to, like this:

  cap --apply-to ~/projects/myapp

You'll wind up with a sample deployment recipe in config/deploy.rb and some new
rake tasks in config/tasks.

(Currently, --apply-to only works with Rails applications.)

確認を入れるようなオプションは無いらしい。( -i とか。)

capの実行ファイルを見ても、呼び出されたら、requireを処理してexecute!してるだけ。

やりたきゃ自前拡張、ってことかな。