deliver/lib/deliver/submit_for_review.rb in fastlane-2.138.0 vs deliver/lib/deliver/submit_for_review.rb in fastlane-2.139.0
- old
+ new
@@ -56,14 +56,20 @@
UI.user_error!("Could not find app with app identifier") unless app
start = Time.now
build = nil
+ use_latest_version = app_version.nil?
+
loop do
# Sometimes candidate_builds don't appear immediately after submission
# Wait for candidate_builds to appear on App Store Connect
# Issue https://github.com/fastlane/fastlane/issues/10411
- candidate_builds = app.latest_version.candidate_builds
+ if use_latest_version
+ candidate_builds = app.latest_version.candidate_builds
+ else
+ candidate_builds = app.tunes_all_builds_for_train(train: app_version)
+ end
if (candidate_builds || []).count == 0
UI.message("Waiting for candidate builds to appear...")
if (Time.now - start) > (60 * 5)
UI.user_error!("Could not find any available candidate builds on App Store Connect to submit")
else