Skip to content

Instantly share code, notes, and snippets.

@spikegrobstein
Last active December 16, 2015 16:20
Show Gist options
  • Save spikegrobstein/5462831 to your computer and use it in GitHub Desktop.
Save spikegrobstein/5462831 to your computer and use it in GitHub Desktop.
Deploying to multiple environments in a single capistrano command
# This is such a hack. holy shit.
# use it like this:
# cap production deploy sandbox deploy
require 'capistrano/ext/multistage'
set :base_servers, @roles.clone
stages.each do |stage|
before(stage) do
@roles.replace(base_servers)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment