Method: BigKeeper::ModuleService#finish

Defined in:
lib/big_keeper/service/module_service.rb

#finish(path, user, module_name, home_branch_name, type) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/big_keeper/service/module_service.rb', line 54

def finish(path, user, module_name, home_branch_name, type)
  Logger.highlight("Finish branch '#{home_branch_name}' for module '#{module_name}'...")

  verify_module(path, user, module_name, home_branch_name, type)

  module_git = BigkeeperParser.module_git(module_name)
  PodfileOperator.new.find_and_replace("#{path}/Podfile",
                                       module_name,
                                       ModuleType::GIT,
                                       GitInfo.new(module_git, GitType::BRANCH, home_branch_name))

  module_full_path = BigkeeperParser.module_full_path(path, user, module_name)

  GitService.new.verify_push(module_full_path, "finish branch #{home_branch_name}", home_branch_name, module_name)

  GitService.new.verify_rebase(module_full_path, GitflowType.base_branch(type), module_name)

  `open #{BigkeeperParser.module_pulls(module_name)}`
end