Class: Xcake::ShellScriptBuildPhase

Inherits:
BuildPhase show all
Defined in:
lib/xcake/dsl/build_phase/shell_script_build_phase.rb

Overview

This class is used to represent a shell script build phase

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BuildPhase

#initialize

Constructor Details

This class inherits a constructor from Xcake::BuildPhase

Instance Attribute Details

#input_file_list_pathsObject

Returns the value of attribute input_file_list_paths.



14
15
16
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 14

def input_file_list_paths
  @input_file_list_paths
end

#input_pathsObject

input/output paths



12
13
14
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 12

def input_paths
  @input_paths
end

#nameObject

The name of the build phase as shown in Xcode



6
7
8
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 6

def name
  @name
end

#output_file_list_pathsObject

Returns the value of attribute output_file_list_paths.



15
16
17
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 15

def output_file_list_paths
  @output_file_list_paths
end

#output_pathsObject

Returns the value of attribute output_paths.



13
14
15
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 13

def output_paths
  @output_paths
end

#scriptObject

String coataining the contents of the script to run



9
10
11
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 9

def script
  @script
end

Instance Method Details

#build_phase_typeObject



17
18
19
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 17

def build_phase_type
  Xcodeproj::Project::Object::PBXShellScriptBuildPhase
end

#configure_native_build_phase(native_build_phase, _context) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 21

def configure_native_build_phase(native_build_phase, _context)
  native_build_phase.name = name
  native_build_phase.shell_script = script.strip_heredoc
  native_build_phase.input_paths = input_paths || []
  native_build_phase.output_paths = output_paths || []
  native_build_phase.input_file_list_paths = input_file_list_paths || []
  native_build_phase.output_file_list_paths = output_file_list_paths || []
end

#to_sObject



30
31
32
# File 'lib/xcake/dsl/build_phase/shell_script_build_phase.rb', line 30

def to_s
  "BuildPhase<#{name}>"
end