class Souyuz::BuildCommandGenerator

Responsible for building the fully working build command

Public Class Methods

build_targets() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 40
def build_targets
  Souyuz.config[:build_target].map! { |t| "-t:#{t}" }
end
compiler_bin() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 20
def compiler_bin
  Souyuz.config[:compiler_bin]
end
generate() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 5
def generate
  parts = prefix
  parts << compiler_bin
  parts += options
  parts += targets
  parts += project
  parts += pipe

  parts
end
options() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 24
def options
  config = Souyuz.config

  options = []
  options << config[:extra_build_options] if config[:extra_build_options]
  options << "-p:Configuration=#{config[:build_configuration]}" if config[:build_configuration]
  options << "-p:Platform=#{config[:build_platform]}" if Souyuz.project.ios? and config[:build_platform]
  options << "-p:BuildIpa=true" if Souyuz.project.ios?
  if config[:solution_path]
    solution_dir = File.dirname(config[:solution_path])
    options << "-p:SolutionDir=#{solution_dir}/"
  end

  options
end
pipe() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 61
def pipe
  pipe = []

  pipe
end
prefix() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 16
def prefix
  [""]
end
project() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 52
def project
  path = []

  path << Souyuz.config[:project_path] # if Souyuz.project.android?
  # path << Souyuz.config[:solution_path] if Souyuz.project.ios? or Souyuz.project.osx?

  path
end
targets() click to toggle source
# File lib/souyuz/generators/build_command_generator.rb, line 44
def targets
  targets = []
  targets += build_targets
  targets << "-t:SignAndroidPackage" if Souyuz.project.android?

  targets
end