Closed edennis closed 11 years ago
Hey, this is a good idea!
However, it does fail when calling cap --dry-run cap_gun:email directly:
$ be cap --dry-run cap_gun:email
triggering start callbacks for `cap_gun:email'
* 2013-08-08 10:36:07 executing `multistage:ensure'
*** Defaulting to `edge'
* 2013-08-08 10:36:07 executing `edge'
triggering after callbacks for `multistage:ensure'
* 2013-08-08 10:36:07 executing `cap_gun:email'
* executing "ls -x /virtual/activities/releases"
* executing "cat /virtual/activities/current/REVISION"
fatal: bad flag '--pretty=format:%h:%s' used after filename
This must be caused by the necessary revision variables not being set on a dry run: https://github.com/xing/cap_gun/blob/master/lib/cap_gun/presenter.rb#L60
Could you investigate? Maybe just checking for dry_run
at an earlier point is a pragmatic solution.
Ok, I've redone the PR. Please try this one out: https://github.com/xing/cap_gun/pull/5
I've adapted the cap_gun:email recipe to respect capistrano's dry_run option (cap -n) so that no mail is sent went testing a deploy.