It’s a week later than I said, but it’s here at last: SwitchTower 0.10.0. I figure there will be one or two more releasees before 1.0.
This release addresses several longstanding bug reports and adds some nice new functionality. To update, just do:
gem install --include-dependencies switchtower
And then update each of your apps by doing:
switchtower --apply-to /path/to/app
When prompted, keep your
config/deploy.rb file, and replace your
You can read the complete changelog, but here’s a quick overview of some of the most notable changes:
- Handle SSH password prompts formatted like “someone’s password:”
- Allow the sudo password to be reentered if it was entered incorrectly
- Errors during checkout are now caught and reported early
- Avoid timeouts on long-running commands
- Add a small sleep during command processing to give the CPU a rest
- Rake tasks should work much more nicely on Windows (you’ll need to do
switchtower --apply-to /path/to/appto update, keeping your
There is now an
ssh_options hash that you can use in your recipe files to set custom SSH connection options, like setting a non-standard port to connect on:
ssh_options[:port] = 2345
Allow svn checkouts to use
export instead of
If you don’t want to use an
svn co to checkout your code, you can set the
:checkout variable to
:export, and SwitchTower will use
svn export instead.
set :checkout, :export
This variable defaults to
There is now an
update_current task that just does an
svn up on the last-deployed release. This is useful for trivial updates, like when a template changed.
You can easily remove unused releases from your deployment directories with the
cleanup task. It will (by default) keep the 5 most recent releases, and delete the rest.
SFTP for file transfers
Net::SFTP is now used (if it is available) for file transfers. This should make transferring large files more robust, as well as allow binary characters in files.
You can now set the
:restart_via variable to
:run, if you need to have the
restart task use
run instead of
set :restart_via, :run
This defaults variable to