spaceship/lib/spaceship/test_flight/build.rb in fastlane-2.127.0.beta.20190709200015 vs spaceship/lib/spaceship/test_flight/build.rb in fastlane-2.127.0

- old
+ new

@@ -215,12 +215,11 @@ def submit_for_testflight_review! return if ready_to_test? return if approved? - build = find_app_store_connect_build - Spaceship::ConnectAPI.post_beta_app_review_submissions(build_id: build["id"]) + Spaceship::ConnectAPI.post_beta_app_review_submissions(build_id: id) end def expire! client.expire_build(app_id: app_id, build_id: id, build: self) end @@ -229,11 +228,15 @@ client.add_group_to_build(app_id: app_id, group_id: group.id, build_id: id) end # Bridges the TestFlight::Build to the App Store Connect API build def find_app_store_connect_build - resp = Spaceship::ConnectAPI.get_builds(filter: { expired: false, processingState: "PROCESSING,VALID", version: self.build_version, "preReleaseVersion.version" => self.train_version, app: app_id }) - resp.first + builds = Spaceship::ConnectAPI::Build.all( + app_id: app_id, + version: self.train_version, + build_number: self.build_version + ) + return builds.find { |build| build.id == id } end end end end