lib/gym/runner.rb in gym-1.4.0 vs lib/gym/runner.rb in gym-1.5.0

- old
+ new

@@ -6,14 +6,10 @@ class Runner # @return (String) The path to the resulting ipa def run clear_old_files - if Gym.project.tvos? - UI.user_error!("gym doesn't suppoort tvOS projects yet, we're working on adding this feature!") - end - build_app verify_archive FileUtils.mkdir_p(Gym.config[:output_directory]) @@ -22,11 +18,11 @@ fix_package compress_and_move_dsym move_ipa elsif Gym.project.mac? compress_and_move_dsym - move_mac_app + copy_mac_app end end ##################################################### # @!group Printing out things @@ -137,15 +133,15 @@ UI.success "Successfully exported and signed the ipa file:" UI.message ipa_path ipa_path end - # Move the .app from the archive into the output directory - def move_mac_app + # Copies the .app from the archive into the output directory + def copy_mac_app app_path = Dir[File.join(BuildCommandGenerator.archive_path, "Products/Applications/*.app")].last UI.crash!("Couldn't find application in '#{BuildCommandGenerator.archive_path}'") unless app_path - FileUtils.mv(app_path, File.expand_path(Gym.config[:output_directory]), force: true) + FileUtils.cp_r(app_path, File.expand_path(Gym.config[:output_directory]), remove_destination: true) app_path = File.join(Gym.config[:output_directory], File.basename(app_path)) UI.success "Successfully exported the .app file:" UI.message app_path app_path