class PodPrebuild::CachePusher
Attributes
cache_branch[R]
Public Class Methods
new(options)
click to toggle source
Calls superclass method
PodPrebuild::CommandExecutor::new
# File lib/command/executor/pusher.rb, line 7 def initialize(options) super(options) @cache_branch = options[:cache_branch] end
Public Instance Methods
run()
click to toggle source
# 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
Private Instance Methods
commit_and_push_cache()
click to toggle source
# File lib/command/executor/pusher.rb, line 28 def commit_and_push_cache commit_message = "Update prebuilt cache" git("add .") git("commit -m '#{commit_message}'") git("push origin #{@cache_branch}") end
print_message_for_local_cache()
click to toggle source
# File lib/command/executor/pusher.rb, line 24 def print_message_for_local_cache Pod::UI.puts "Skip pushing cache as you're using local cache".yellow end