spaceship/lib/spaceship/test_flight/build_trains.rb in fastlane-2.127.0.beta.20190709200015 vs spaceship/lib/spaceship/test_flight/build_trains.rb in fastlane-2.127.0
- old
+ new
@@ -11,11 +11,15 @@
# It is the responsibility of Build to lazy-load the necessary properties.
#
# See `Spaceship::TestFlight::Build#reload`
def self.all(app_id: nil, platform: nil, retry_count: 3)
- resps = Spaceship::ConnectAPI.get_builds(filter: { app: app_id, processingState: "VALID,PROCESSING,FAILED,INVALID" }, limit: 100, sort: "uploadedDate", includes: "preReleaseVersion,app").all_pages
- connect_builds = resps.map(&:to_models).flatten
+ filter_platform = Spaceship::ConnectAPI::Platform.map(platform) if platform
+ connect_builds = Spaceship::ConnectAPI::Build.all(
+ app_id: app_id,
+ sort: "uploadedDate",
+ platform: filter_platform
+ )
trains = {}
connect_builds.each do |connect_build|
train_version = connect_build.app_version
trains[train_version] ||= []