phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
373 stars 74 forks source link

Sends notifications when using --dry-run #33

Closed KieranP closed 8 years ago

KieranP commented 9 years ago

Gem doesn't seem to respect --dry-run and sends notifications regardless

phallstrom commented 9 years ago

Interesting. Checking capistrano source I'm not sure there's a good place to check for this.

See: https://github.com/capistrano/capistrano/blob/45e851bdc5ed80970a7be90f080f030aa7386190/lib/capistrano/application.rb#L111

All they do is set the sshkit_backend. Kind of hate to match on that and make an assumption. We could over ride it, but that makes me a nervous as well. Almost seems like we should submit a patch to capistrano to set a dry_run variable other parts of the system can check, then we can check for that.

Thoughts?

KieranP commented 9 years ago

Hmm, this is based on Rake right, so what about these, do they return anything ( I don't have time to check myself right now )?

Capistrano::Application.options.dry_run
Rake::Application.options.dry_run
phallstrom commented 9 years ago

No luck. Weird. Seems like there must be a way. I'll poke at it some more soon.

phallstrom commented 9 years ago

https://github.com/capistrano/capistrano/issues/1462