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

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#load_podfile, #prebuild_config, #update_cli_config

Constructor Details

#initialize(argv) ⇒ Prebuild

Returns a new instance of Prebuild.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/command/prebuild.rb', line 22

def initialize(argv)
  super
  prebuild_all_pods = argv.flag?("all")
  prebuild_targets = argv.option("targets", "").split(",")
  update_cli_config(
    :prebuild_job => true,
    :prebuild_all_pods => prebuild_all_pods,
    :prebuild_config => argv.option("config")
  )
  update_cli_config(:prebuild_targets => prebuild_targets) unless prebuild_all_pods
  @prebuilder = PodPrebuild::CachePrebuilder.new(
    config: prebuild_config,
    cache_branch: argv.shift_argument || "master",
    repo_update: argv.flag?("repo-update"),
    no_fetch: argv.flag?("fetch") == false,
    push_cache: argv.flag?("push")
  )
end

Instance Attribute Details

#prebuilderObject (readonly)

Returns the value of attribute prebuilder.



8
9
10
# File 'lib/command/prebuild.rb', line 8

def prebuilder
  @prebuilder
end

Class Method Details

.optionsObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/command/prebuild.rb', line 11

def self.options
  [
    ["--config", "Config (Debug, Test...) to prebuild"],
    ["--repo-update", "Update pod repo before installing"],
    ["--no-fetch", "Do not perform a cache fetch beforehand"],
    ["--push", "Push cache to repo upon completion"],
    ["--all", "Prebuild all binary pods regardless of cache validation"],
    ["--targets", "Targets to prebuild. Use comma (,) to specify a list of targets"]
  ].concat(super)
end

Instance Method Details

#runObject



41
42
43
# File 'lib/command/prebuild.rb', line 41

def run
  @prebuilder.run
end