Class: Pod::Command::Binary::Prebuild

Inherits:
Pod::Command::Binary show all
Defined in:
lib/command/prebuild.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#prebuild_config

Constructor Details

#initialize(argv) ⇒ Prebuild

Returns a new instance of Prebuild.



15
16
17
18
19
20
21
22
# File 'lib/command/prebuild.rb', line 15

def initialize(argv)
  super
  @prebuilder = PodPrebuild::CachePrebuilder.new(
    config: prebuild_config,
    cache_branch: argv.shift_argument || "master",
    push_cache: argv.flag?("push")
  )
end

Class Method Details

.optionsObject



9
10
11
12
13
# File 'lib/command/prebuild.rb', line 9

def self.options
  [
    ["--push", "Push cache to repo upon completion"]
  ]
end

Instance Method Details

#runObject



24
25
26
27
# File 'lib/command/prebuild.rb', line 24

def run
  Pod::Podfile::DSL.prebuild_job = true
  @prebuilder.run
end