Created
November 3, 2010 22:03
-
-
Save ivar/661805 to your computer and use it in GitHub Desktop.
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
task :check_deployment_branch, :except => {:no_release => true, :no_symlink => true} do | |
if rails_env == 'production' | |
CLI.ui.say "================================\nDeploying to PRODUCTION.\n================================\n\n" | |
# CLI.ui.say "Current production branch is set to: #{repository}" | |
set :branch, "master" | |
set :continue, Proc.new {CLI.ui.ask "Do you wish to continue? [yes/NO]"} | |
raise Error, "Failing production deploy" unless continue == 'yes' || continue == 'y' | |
else | |
CLI.ui.say "================================\nDeploying to #{deploy_type.upcase}.\n================================\n\n" | |
set :new_branch, Proc.new { CLI.ui.ask "Please pick your branch or press ENTER for #{branch}."} | |
set :branch, new_branch unless "#{new_branch}".strip.empty? | |
%x(say -v Zarvox "Deployment of branch #{branch} to #{deploy_type} initiated." &) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment