Module: FIR::Build

Included in:
Util::ClassMethods
Defined in:
lib/fir/util/build.rb

Instance Method Summary collapse

Instance Method Details

#build_apk(*args, options) ⇒ Object



40
41
# File 'lib/fir/util/build.rb', line 40

def build_apk *args, options
end

#build_ipa(*args, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/fir/util/build.rb', line 6

def build_ipa *args, options
  # check build environment and make build cmd
  check_osx

  if args.first.blank? || !File.exist?(args.first)
    @build_dir = Dir.pwd
  else
    @build_dir = File.absolute_path(args.shift.to_s) # pop the first param
  end

  @token     = options[:token] || current_token
  @changelog = options[:changelog].to_s
  @short     = options[:short].to_s
  @proj      = options[:proj].to_s

  @build_tmp_dir = Dir.mktmpdir
  @output_path   = options[:output].blank? ? "#{@build_dir}/fir_build_ipa" : File.absolute_path(options[:output].to_s)
  @ipa_build_cmd = initialize_ipa_build_cmd(args, options)

  puts @ipa_build_cmd if $DEBUG

  logger.info "Building......"
  logger_info_dividing_line

  logger.info `#{@ipa_build_cmd}`

  output_ipa

  publish_build_ipa if options.publish?
  upload_build_mapping_file if options.mapping?

  logger_info_blank_line
end