Sha256: 515a242390d5d9a412d3813583696e0bdabd021af0987dbd4283335e134b9a7a

Contents?: true

Size: 1.03 KB

Versions: 9

Compression:

Stored size: 1.03 KB

Contents

module Xcake
  # This class is used to represent a shell script build phase
  #
  class ShellScriptBuildPhase < BuildPhase
    # The name of the build phase as shown in Xcode
    attr_accessor :name

    # String coataining the contents of the script to run
    attr_accessor :script

    # input/output paths
    attr_accessor :input_paths
    attr_accessor :output_paths
    attr_accessor :input_file_list_paths
    attr_accessor :output_file_list_paths

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

    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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xcake-0.13.0 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.12.1 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.12.0 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.11.0 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.10.0 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.9.4 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.9.3 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.9.2 lib/xcake/dsl/build_phase/shell_script_build_phase.rb
xcake-0.9.1 lib/xcake/dsl/build_phase/shell_script_build_phase.rb