SwitchTower 0.10.0

You can read the complete changelog, but here’s a quick overview of some of the most notable changes:

Bugs Fixed

  • 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/app to update, keeping your config/deploy.rb and overwriting lib/tasks/switchtower.rake)

New Features

ssh_options variable

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 co

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 :co.

update_current task

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.

cleanup task

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.

restart_via variable

You can now set the :restart_via variable to :run, if you need to have the restart task use run instead of sudo.

set :restart_via, :run

This defaults variable to :sudo.