Last active
December 16, 2015 16:20
-
-
Save spikegrobstein/5462831 to your computer and use it in GitHub Desktop.
Deploying to multiple environments in a single capistrano command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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