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, #prepare_cache_dir, #use_local_cache?

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
20
# File 'lib/command/executor/pusher.rb', line 12

def run
  Pod::UI.step("Pushing cache") do
    if @config.local_cache?
      print_message_for_local_cache
    else
      commit_and_push_cache
    end
  end
end