lib/gym/runner.rb in gym-1.6.0 vs lib/gym/runner.rb in gym-1.6.1

- old
+ new

@@ -1,8 +1,9 @@ require 'pty' require 'open3' require 'fileutils' +require 'shellwords' module Gym class Runner # @return (String) The path to the resulting ipa def run @@ -75,10 +76,15 @@ Gym::XcodebuildFixes.swift_library_fix Gym::XcodebuildFixes.watchkit_fix Gym::XcodebuildFixes.watchkit2_fix end + def mark_archive_as_built_by_gym(archive_path) + escaped_archive_path = archive_path.shellescape + system("xattr -w info.fastlane.generated_by_gym 1 #{escaped_archive_path}") + 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, @@ -86,9 +92,10 @@ print_command: !Gym.config[:silent], error: proc do |output| ErrorHandler.handle_build_error(output) end) + mark_archive_as_built_by_gym(BuildCommandGenerator.archive_path) UI.success "Successfully stored the archive. You can find it in the Xcode Organizer." UI.verbose("Stored the archive in: " + BuildCommandGenerator.archive_path) end # Makes sure the archive is there and valid