Class: PodPrebuild::CachePusher

Inherits:
CommandExecutor show all
Defined in:
lib/command/executor/pusher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommandExecutor

#git, #git_clone, #installer

Constructor Details

#initialize(options) ⇒ CachePusher

Returns a new instance of CachePusher.



7
8
9
10
# File 'lib/command/executor/pusher.rb', line 7

def initialize(options)
  super(options)
  @cache_branch = options[:cache_branch]
end

Instance Attribute Details

#cache_branchObject (readonly)

Returns the value of attribute cache_branch.



5
6
7
# File 'lib/command/executor/pusher.rb', line 5

def cache_branch
  @cache_branch
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
# File 'lib/command/executor/pusher.rb', line 12

def run
  Pod::UI.step("Pushing cache") do
    commit_message = "Update prebuilt cache".shellescape
    git("add .")
    git("commit -m '#{commit_message}'")
    git("push origin #{@cache_branch}")
  end
end