Class: XCCache::Command::Build
- Inherits:
-
XCCache::Command
- Object
- CLAide::Command
- XCCache::Command
- XCCache::Command::Build
- Defined in:
- lib/xccache/command/build.rb
Instance Attribute Summary
Attributes inherited from XCCache::Command
#build_options, #install_options
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Build
constructor
A new instance of Build.
- #run ⇒ Object
Methods inherited from XCCache::Command
Methods included from XCCache::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Build
Returns a new instance of Build.
19 20 21 22 23 |
# File 'lib/xccache/command/build.rb', line 19 def initialize(argv) super @targets = argv.arguments! @should_integrate = argv.flag?("integrate", true) end |
Class Method Details
.options ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/xccache/command/build.rb', line 8 def self. [ *Options., ["--integrate/no-integrate", "Whether to integrate after building target (default: true)"], ["--recursive", "Whether to build their recursive targets if cache-missed (default: false)"], ].concat(super) end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/xccache/command/build.rb', line 25 def run installer = Installer::Build.new( ctx: self, targets: @targets, ) installer.install! # Reuse umbrella_pkg from previous installers return unless @should_integrate Installer::Use.new( ctx: self, umbrella_pkg: installer.umbrella_pkg, ).install! end |