lib/gym/runner.rb in gym-0.5.0 vs lib/gym/runner.rb in gym-0.6.0

- old
+ new

@@ -12,14 +12,11 @@ FileUtils.mkdir_p(Gym.config[:output_directory]) if Gym.project.ios? package_app - Gym::XcodebuildFixes.swift_library_fix - Gym::XcodebuildFixes.watchkit_fix - Gym::XcodebuildFixes.clear_patched_package_application - + fix_package compress_and_move_dsym move_ipa elsif Gym.project.mac? compress_and_move_dsym move_mac_app @@ -58,15 +55,23 @@ ##################################################### # @!group The individual steps ##################################################### def clear_old_files - if File.exist? PackageCommandGenerator.ipa_path + return unless Xcode.pre_7? + if File.exist?(PackageCommandGenerator.ipa_path) File.delete(PackageCommandGenerator.ipa_path) end end + def fix_package + return unless Xcode.pre_7? + Gym::XcodebuildFixes.swift_library_fix + Gym::XcodebuildFixes.watchkit_fix + Gym::XcodebuildFixes.clear_patched_package_application + end + # Builds the app and prepares the archive def build_app command = BuildCommandGenerator.generate print_command(command, "Generated Build Command") if $verbose FastlaneCore::CommandExecutor.execute(command: command, @@ -112,11 +117,11 @@ command_result = `#{command}` Helper.log.info command_result if $verbose puts "" # new line - Helper.log.info "Successfully exported and compressed dSYM file.".green + Helper.log.info "Successfully exported and compressed dSYM file".green end # Moves over the binary and dsym file to the output directory # @return (String) The path to the resulting ipa file def move_ipa @@ -138,8 +143,18 @@ app_path = File.join(Gym.config[:output_directory], File.basename(app_path)) Helper.log.info "Successfully exported the .app file:".green Helper.log.info app_path app_path + end + + private + + def find_archive_path + if Xcode.pre_7? + BuildCommandGenerator.archive_path + else + Dir.glob(File.join(BuildCommandGenerator.build_path, "*.ipa")).last + end end end end