Class: PodPrebuild::CachePusher

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

Instance Method Summary collapse

Methods inherited from CommandExecutor

#git, #git_clone

Constructor Details

#initialize(options) ⇒ CachePusher

Returns a new instance of CachePusher.



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

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

Instance Method Details

#runObject



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

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