deliver/lib/deliver/upload_screenshots.rb in fastlane-2.150.0.rc7 vs deliver/lib/deliver/upload_screenshots.rb in fastlane-2.150.0

- old
+ new

@@ -63,12 +63,12 @@ threads.each(&:join) Helper.hide_loading_indicator unless FastlaneCore::Globals.verbose? end # Crash if any errors happen while deleting - unless errors.empty? - UI.crash!(errors.map(&:message).join("\n")) + errors.each do |error| + UI.error(error.message) end end end # Finding languages to enable @@ -90,17 +90,30 @@ # Refresh version localizations localizations = version.get_app_store_version_localizations end - upload_screenshots(screenshots_per_language, localizations) + upload_screenshots(screenshots_per_language, localizations, options) end - def upload_screenshots(screenshots_per_language, localizations) + def upload_screenshots(screenshots_per_language, localizations, options) # Check if should wait for processing - wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING") + # Default to waiting if submitting for review (since needed for submission) + # Otherwise use enviroment variable + if ENV["DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING"].nil? + wait_for_processing = options[:submit_for_review] + UI.verbose("Setting wait_for_processing from ':submit_for_review' option") + else + UI.verbose("Setting wait_for_processing from 'DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING' environment variable") + wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING") + end + if wait_for_processing - UI.important("Set environment variable DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process") + UI.important("Will wait for screenshot image processing") + UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process") + else + UI.important("Skipping the wait for screenshot image processing (which may affect submission)") + UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=false to skip waiting for screenshots to process") end # Upload screenshots indized = {} # per language and device type