Module: Gith::Deploy

Includes:
Slack
Included in:
Commands
Defined in:
lib/gith/commands/deploy.rb

Instance Method Summary collapse

Methods included from Slack

#deploy_env, #lock_and_deploy, #lock_env, #post_message, #slack

Instance Method Details

#deploy(branch = 'master', environment = 'production') ⇒ Object



8
9
10
11
12
13
# File 'lib/gith/commands/deploy.rb', line 8

def deploy(branch='master', environment='production')
  # make it so it defaults to deploy [current] [to] branch
  exit unless yes_or_no "Deploy #{branch.magenta} to #{environment.cyan}?"
  post_message("deploy #{branch} to #{environment}")
  success "Deployed"
end