Class: LiveBuzz::Gitx::Cli::IntegrateCommand

Inherits:
BaseCommand show all
Defined in:
lib/livebuzz/gitx/cli/integrate_command.rb

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Methods included from Thor::Actions

#ask_editor, #run_cmd

Constructor Details

This class inherits a constructor from LiveBuzz::Gitx::Cli::BaseCommand

Instance Method Details

#integrate(integration_branch = 'staging') ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/livebuzz/gitx/cli/integrate_command.rb', line 12

def integrate(integration_branch = 'staging')
  assert_aggregate_branch!(integration_branch)

  branch = feature_branch_name
  print_message(branch, integration_branch)

  begin
    execute_command(UpdateCommand, :update)
  rescue
    fail MergeError, "Merge Conflict Occurred. Please Merge Conflict Occurred. Please fix merge conflict and rerun the integrate command"
  end

  integrate_branch(branch, integration_branch) unless options[:resume]
  checkout_branch branch
end