Class: Yolo::Tasks::Ios::Build

Inherits:
BaseTask
  • Object
show all
Defined in:
lib/yolo/tasks/ios/build.rb

Overview

Executes all build related tasks

Author:

  • Alex Fish

Instance Method Summary collapse

Methods inherited from BaseTask

#name

Instance Method Details

#build_opts_string(*additional_opts) ⇒ String

Overrides the superclass build_opts_string method and appends skip code sign command if debug confid is defined

pipe appended if defined

Parameters:

  • additional_opts (Array)

    an array of additional options for the build command

Returns:

  • (String)

    the option string with additional options and test output



19
20
21
22
23
24
25
# File 'lib/yolo/tasks/ios/build.rb', line 19

def build_opts_string(*additional_opts)
  options = build_opts + additional_opts
  if configuration == "Debug" or configuration.nil?
    options = options << "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO"
  end
  return options.compact.join(" ")
end

#defineObject

Defines rake tasks available to the Build class



45
46
47
48
49
50
51
52
53
54
# File 'lib/yolo/tasks/ios/build.rb', line 45

def define
  super
  namespace :yolo do
    desc "Builds the specified scheme(s)."
    task :build do
      xcodebuild :clean
      xcodebuild :build
    end
  end
end

#schemeString

Returns the build class’s scheme attribute, if no attribute is set then check for the scheme env var

Returns:

  • (String)

    The build class’s scheme attribute



32
33
34
35
36
37
38
39
40
# File 'lib/yolo/tasks/ios/build.rb', line 32

def scheme
  scheme = @scheme

  if !scheme
    scheme = ENV['YOLO_BUILD_SCHEME']
  end

  return scheme
end