lib/deliver/submit_for_review.rb in deliver-1.10.1 vs lib/deliver/submit_for_review.rb in deliver-1.10.2
- old
+ new
@@ -53,11 +53,11 @@
UI.user_error!("Could not find app with app identifier #{WatchBuild.config[:app_identifier]}") unless app
start = Time.now
loop do
- build = find_build(app)
+ build = find_build(app.latest_version.candidate_builds)
return build if build.processing == false
UI.message("Waiting iTunes Connect processing for build #{build.train_version} (#{build.build_version})... this might take a while...")
if (Time.now - start) > (60 * 5)
UI.message("")
@@ -66,19 +66,19 @@
sleep 30
end
nil
end
- def find_build(app)
+ def find_build(candidate_builds)
build = nil
- app.latest_version.candidate_builds.each do |b|
+ candidate_builds.each do |b|
if !build or b.upload_date > build.upload_date
build = b
end
end
unless build
- UI.error(app.latest_version.candidate_builds)
+ UI.error(candidate_builds)
UI.crash!("Could not find build")
end
return build
end