Class: XcodeArchiveCache::Command::Inject
Constant Summary
collapse
- DEFAULT_CACHEFILE =
"Cachefile"
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Logs
#debug, #error, #info, #set_log_level
run
Constructor Details
#initialize(argv) ⇒ Inject
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/command/inject.rb', line 20
def initialize(argv)
super
@configuration_name = argv.option("configuration")
if @configuration_name == nil
error("configuration is required")
exit 1
end
@storage = argv.option("storage")
if @storage == nil
error("storage parameter is required")
exit 1
end
@cachefile_path = argv.option("cachefile", DEFAULT_CACHEFILE)
@destination = argv.option("destination", XcodeArchiveCache::Xcodebuild::GENERIC_DESTINATION)
end
|
Class Method Details
.options ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/command/inject.rb', line 9
def self.options
[
["--cachefile=/path/to/Cachefile", "Explicit Cachefile location, defaults to $PWD/Cachefile"],
["--configuration", "Name of configuration from Cachefile, required"],
["--destination=[<full destination specifier>|generic]", "xcodebuild-style destination. Defaults to 'generic', ignored for archive action"],
["--storage=/path/to/storage", "Storage dir path, required"]
].concat(super)
end
|
Instance Method Details
#run ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/command/inject.rb', line 39
def run
config = XcodeArchiveCache::Config.from_file(@cachefile_path).entry
config.settings.destination = @destination
config.active_configuration_name = @configuration_name
config.storage.type = :local
config.storage.path = @storage
debug(config)
XcodeArchiveCache::Runner.new(config).run
end
|