mydrive / capistrano-deploytags

Add timestamped Git tags for each environment on deployment
BSD 2-Clause "Simplified" License
123 stars 20 forks source link

don't create and push the tag when sshkit backend is SSHKit::Backend:::Printer #27

Closed edslocomb closed 9 years ago

edslocomb commented 9 years ago

Fixes https://github.com/mydrive/capistrano-deploytags/issues/26

edslocomb commented 9 years ago

By way of explanation:

The fix might look a bit brittle, but the SSHKit backend is the only thing capistrano sets when --dry-run is specified; there's no convenience dry_run method to call or variable to fetch.

And that setting tells us why the problem arose: inside a run_locally{} block, SSHKit isn't used, and all strategy.git() commands get executed for reals.

gavinheavyside commented 9 years ago

It might be a bit brittle, but I can't see a better way either. Thanks for the contribution.

gavinheavyside commented 9 years ago

Released as v1.0.3 https://rubygems.org/gems/capistrano-deploytags/versions/1.0.3