lib/gym/runner.rb in gym-0.2.0 vs lib/gym/runner.rb in gym-0.2.1

- old
+ new

@@ -11,12 +11,10 @@ package_app swift_library_fix move_results end - private - ##################################################### # @!group Printing out things ##################################################### # @param [Array] An array containing all the parts of the command @@ -40,10 +38,12 @@ headings: ["Option", "Value"], rows: rows.delete_if { |c| c.to_s.empty? } ) end + private + ##################################################### # @!group The individual steps ##################################################### def clear_old_files @@ -54,13 +54,16 @@ # Builds the app and prepares the archive def build_app command = BuildCommandGenerator.generate print_command(command, "Generated Build Command") if $verbose - Gym::CommandsExecutor.execute(command: command, print_all: true, error: proc do |output| - ErrorHandler.handle_build_error(output) - end) + FastlaneCore::CommandExecutor.execute(command: command, + print_all: true, + print_command: !Gym.config[:silent], + error: proc do |output| + ErrorHandler.handle_build_error(output) + end) Helper.log.info("Successfully stored the archive. You can find it in the Xcode Organizer.".green) Helper.log.info("Stored the archive in: ".green + BuildCommandGenerator.archive_path) if $verbose end @@ -73,13 +76,16 @@ def package_app command = PackageCommandGenerator.generate print_command(command, "Generated Package Command") if $verbose - Gym::CommandsExecutor.execute(command: command, print_all: false, error: proc do |output| - ErrorHandler.handle_package_error(output) - end) + FastlaneCore::CommandExecutor.execute(command: command, + print_all: false, + print_command: !Gym.config[:silent], + error: proc do |output| + ErrorHandler.handle_package_error(output) + end) end # Determine whether it is a Swift project and, eventually, include all required libraries to copy from Xcode's toolchain directory. # Since there's no "xcodebuild" target to do just that, it is done post-build when exporting an archived build. def swift_library_fix @@ -106,13 +112,16 @@ Dir.chdir(tmpdir) do command_parts = ["zip --recurse-paths #{PackageCommandGenerator.ipa_path} SwiftSupport"] command_parts << "> /dev/null" unless $verbose print_command(command_parts, "Fix Swift embedded code if needed") if $verbose - Gym::CommandsExecutor.execute(command: command_parts, print_all: false, error: proc do |output| - ErrorHandler.handle_package_error(output) - end) + FastlaneCore::CommandExecutor.execute(command: command_parts, + print_all: false, + print_command: !Gym.config[:silent], + error: proc do |output| + ErrorHandler.handle_package_error(output) + end) end end end end @@ -134,11 +143,10 @@ 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 File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.dsym_path)) + Helper.log.info "Successfully exported and compressed dSYM file.".green end ipa_path = File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.ipa_path)) Helper.log.info "Successfully exported and signed ipa file:".green