Class: Gym::Runner
- Inherits:
-
Object
- Object
- Gym::Runner
- Defined in:
- lib/gym/runner.rb
Printing out things collapse
Instance Method Summary collapse
-
#run ⇒ String
The path to the resulting ipa.
Instance Method Details
#print_command(command, title) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/gym/runner.rb', line 52 def print_command(command, title) rows = command.map do |c| current = c.to_s.dup next unless current.length > 0 match_default_parameter = current.match(/(-.*) '(.*)'/) if match_default_parameter # That's a default parameter, like `-project 'Name'` match_default_parameter[1, 2] else current.gsub!("| ", "\| ") # as the | will somehow break the terminal table [current, ""] end end puts Terminal::Table.new( title: title.green, headings: ["Option", "Value"], rows: rows.delete_if { |c| c.to_s.empty? } ) end |
#run ⇒ String
Returns The path to the resulting ipa.
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 39 40 41 42 43 44 45 |
# File 'lib/gym/runner.rb', line 9 def run unless Gym.config[:skip_build_archive] clear_old_files build_app end verify_archive if Gym.project.produces_archive? FileUtils.mkdir_p(File.(Gym.config[:output_directory])) if Gym.project.ios? || Gym.project.tvos? fix_generic_archive # See https://github.com/fastlane/fastlane/pull/4325 package_app if Gym.project.produces_archive? fix_package compress_and_move_dsym path = move_ipa if Gym.project.produces_archive? move_manifest move_app_thinning move_app_thinning_size_report move_apps_folder elsif Gym.project.mac? path = File.(Gym.config[:output_directory]) compress_and_move_dsym if Gym.project.mac_app? copy_mac_app return path end copy_files_from_path(File.join(BuildCommandGenerator.archive_path, "Products/usr/local/bin/*")) if Gym.project.command_line_tool? end if Gym.project.library? || Gym.project.framework? base_framework_path = Gym.project.build_settings(key: "BUILD_ROOT") base_framework_path = Gym.config[:derived_data_path] + "/Build/Products/" if Gym.config[:derived_data_path] copy_files_from_path("#{base_framework_path}/*/*") path = base_framework_path end path end |