Class: XcodeArchiveCache::Xcodebuild::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/xcodebuild/executor.rb

Instance Method Summary collapse

Constructor Details

#initialize(configuration, platform, destination, action, args) ⇒ Executor

Returns a new instance of Executor.

Parameters:

  • configuration (String)
  • platform (String)
  • destination (String)
  • action (String)
  • args (String)


13
14
15
16
17
18
19
20
# File 'lib/xcodebuild/executor.rb', line 13

def initialize(configuration, platform, destination, action, args)
  @configuration = configuration
  @platform = platform
  @destinations = destination.split("|")
  @action = action
  @args = args
  @shell_executor = XcodeArchiveCache::Shell::Executor.new
end

Instance Method Details

#build(project_path, scheme, derived_data_path) ⇒ Object

Parameters:

  • project_path (String)
  • scheme (String)
  • derived_data_path (String)


40
41
42
43
44
45
46
47
48
49
50
# File 'lib/xcodebuild/executor.rb', line 40

def build(project_path, scheme, derived_data_path)
  flags = [project_flag(project_path),
           configuration_flag,
           destination_flag,
           scheme_flag(scheme),
           derived_data_path_flag(derived_data_path),
           args,
           action]
  command = "#{compile_command(flags)} | xcpretty"
  shell_executor.execute(command, true)
end

#load_build_settings(project_path) ⇒ Object

Parameters:

  • project_path (String)


24
25
26
27
28
29
30
31
32
33
34
# File 'lib/xcodebuild/executor.rb', line 24

def load_build_settings(project_path)
  flags = [project_flag(project_path),
           configuration_flag,
           destination_flag,
           all_targets_flag,
           show_build_settings_flag,
           args,
           action]
  command = compile_command(flags)
  shell_executor.execute_for_output(command)
end