lib/hanzo/modules/deploy.rb in hanzo-0.6.1 vs lib/hanzo/modules/deploy.rb in hanzo-0.6.2

- old
+ new

@@ -7,10 +7,11 @@ protected def initialize_variables @env = extract_argument(1) @env ||= Hanzo::Installers::Remotes.environments.keys.first + @branch = extract_argument(2) end def initialize_cli initialize_help && return if @env.nil? @@ -35,10 +36,10 @@ end def deploy validate_environment_existence! - branch = Hanzo.ask("Branch to deploy in #{@env}:") { |q| q.default = 'HEAD' } + branch = @branch || Hanzo.ask("Branch to deploy in #{@env}:") { |q| q.default = 'HEAD' } Hanzo.run "git push -f #{@env} #{branch}:master" end def run_after_deploy_commands