Module: Gith::Deploy

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

Instance Method Summary collapse

Methods included from Git

#branch_name, #commit_all, #create_branch, #current_branch, #current_story_id, #push_branch, #push_current_branch, #unstaged_changes?

Methods included from Slack

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

Instance Method Details

#deploy(environment = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/gith/commands/deploy.rb', line 9

def deploy(environment=nil)
  environment = asks "Which env would you like to deploy to?" unless environment
  branch      = current_branch

  exit unless yes_or_no "Deploy #{branch.magenta} to #{environment.cyan}?"

  post_message("deploy #{ branch } to #{ environment }")
  success "Deployed"
end