Module: FIR::BuildCommon

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

Instance Method Summary collapse

Instance Method Details

#initialize_build_common_options(args, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fir/util/build_common.rb', line 6

def initialize_build_common_options args, options
  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
end

#logger_info_and_run_build_commandObject



26
27
28
29
30
31
32
33
# File 'lib/fir/util/build_common.rb', line 26

def logger_info_and_run_build_command
  puts @build_cmd if $DEBUG

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

  logger.info `#{@build_cmd}`
end

#publish_build_appObject



19
20
21
22
23
24
# File 'lib/fir/util/build_common.rb', line 19

def publish_build_app
  logger_info_blank_line
  publish @builded_app_path, short:     @short,
                             changelog: @changelog,
                             token:     @token
end