pilot/lib/pilot/build_manager.rb in fastlane-2.192.0 vs pilot/lib/pilot/build_manager.rb in fastlane-2.193.0

- old
+ new

@@ -14,23 +14,30 @@ # Only need to login before upload if no apple_id was given # 'login' will be deferred until before waiting for build processing should_login_in_start = options[:apple_id].nil? start(options, should_login: should_login_in_start) - UI.user_error!("No ipa file given") unless config[:ipa] + UI.user_error!("No ipa or pkg file given") if config[:ipa].nil? && config[:pkg].nil? check_for_changelog_or_whats_new!(options) UI.success("Ready to upload new build to TestFlight (App: #{fetch_app_id})...") dir = Dir.mktmpdir platform = fetch_app_platform - package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id, + if options[:ipa] + package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id, ipa_path: options[:ipa], package_path: dir, platform: platform) + else + package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(app_id: fetch_app_id, + pkg_path: options[:pkg], + package_path: dir, + platform: platform) + end transporter = transporter_for_selected_team(options) result = transporter.upload(package_path: package_path) unless result @@ -92,10 +99,13 @@ def wait_for_build_processing_to_be_complete(return_when_build_appears = false) platform = fetch_app_platform if config[:ipa] app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa]) app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa]) + elsif config[:pkg] + app_version = FastlaneCore::PkgFileAnalyser.fetch_app_version(config[:pkg]) + app_build = FastlaneCore::PkgFileAnalyser.fetch_app_build(config[:pkg]) else app_version = config[:app_version] app_build = config[:build_number] end @@ -106,10 +116,11 @@ build_version: app_build, poll_interval: config[:wait_processing_interval], timeout_duration: config[:wait_processing_timeout_duration], return_when_build_appears: return_when_build_appears, return_spaceship_testflight_build: false, - select_latest: config[:distribute_only] + select_latest: config[:distribute_only], + wait_for_build_beta_detail_processing: true ) unless latest_build.app_version == app_version && latest_build.version == app_build UI.important("Uploaded app #{app_version} - #{app_build}, but received build #{latest_build.app_version} - #{latest_build.version}.") end