lib/spaceship/tunes/build_train.rb in spaceship-0.38.5 vs lib/spaceship/tunes/build_train.rb in spaceship-0.39.0

- old
+ new

@@ -116,13 +116,14 @@ @builds.max_by(&:upload_date) end # @param (testing_type) internal or external def update_testing_status!(new_value, testing_type, build = nil) - data = client.build_trains(self.application.apple_id, testing_type, platform: self.application.platform) - build ||= latest_build if testing_type == 'external' + platform = build ? build.platform : self.application.platform testing_key = "#{testing_type}Testing" + + data = client.build_trains(self.application.apple_id, testing_type, platform: platform) # Delete the irrelevant trains and update the relevant one to enable testing data['trains'].delete_if do |train| if train['versionString'] != version_string true