Class: Papa::Task::Integration::Add

Inherits:
Common::Add show all
Defined in:
lib/papa/task/integration/add.rb

Instance Method Summary collapse

Methods inherited from Base

#run

Constructor Details

#initialize(version, branches) ⇒ Add

Returns a new instance of Add.



7
8
9
10
11
12
# File 'lib/papa/task/integration/add.rb', line 7

def initialize(version, branches)
  @build_type = 'integration'
  @version = version
  @branches = branches
  super()
end

Instance Method Details

#queue(branch) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/papa/task/integration/add.rb', line 14

def queue(branch)
  [
    Command::Git::Checkout.new(build_branch),
    Command::Git::Checkout.new(branch),
    Command::Git::ResetHard.new('origin', branch),
    Command::Git::Rebase.new(build_branch),
    Command::Git::Checkout.new(build_branch),
    Command::Git::Merge.new(branch),
    Command::Git::BranchDelete.new(branch),
    Command::Git::Push.new('origin', build_branch)
  ]
end