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}."} |
NewerOlder