spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.205.0 vs spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.205.1
- old
+ new
@@ -89,25 +89,25 @@
# user didn't specify a team... #thisiswhywecanthavenicethings
loop do
puts("Multiple #{'App Store Connect teams'.yellow} found, please enter the number of the team you want to use: ")
if ENV["FASTLANE_HIDE_TEAM_INFORMATION"].to_s.length == 0
+ first_team = teams.first
puts("Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:")
puts("Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable")
- first_team = teams.first["contentProvider"]
puts("")
- puts(" itc_team_id \"#{first_team['contentProviderId']}\"")
+ puts(" itc_team_id \"#{first_team['providerId']}\"")
puts("")
puts("or")
puts("")
puts(" itc_team_name \"#{first_team['name']}\"")
puts("")
end
# We're not using highline here, as spaceship doesn't have a dependency to fastlane_core or highline
teams.each_with_index do |team, i|
- puts("#{i + 1}) \"#{team['contentProvider']['name']}\" (#{team['contentProvider']['contentProviderId']})")
+ puts("#{i + 1}) \"#{team['name']}\" (#{team['providerId']})")
end
unless Spaceship::Client::UserInterface.interactive?
puts("Multiple teams found on App Store Connect, Your Terminal is running in non-interactive mode! Cannot continue from here.")
puts("Please check that you set FASTLANE_ITC_TEAM_ID or FASTLANE_ITC_TEAM_NAME to the right value.")
@@ -116,11 +116,11 @@
selected = ($stdin.gets || '').strip.to_i - 1
team_to_use = teams[selected] if selected >= 0
if team_to_use
- self.team_id = team_to_use['contentProvider']['contentProviderId'].to_s # actually set the team id here
+ self.team_id = team_to_use['providerId'].to_s # actually set the team id here
return self.team_id
end
end
end
@@ -982,11 +982,11 @@
if retry_error_messages.any? { |message| ex.to_s.include?(message) }
tries -= 1
if tries > 0
logger.warn("Received temporary server error from App Store Connect. Retrying the request...")
- sleep(3) unless Object.const_defined?("SpecHelper")
+ sleep(3) unless Object.const_defined?(:SpecHelper)
retry
end
end
raise Spaceship::Client::UnexpectedResponse, "Temporary App Store Connect error: #{ex}"
@@ -1550,20 +1550,20 @@
seconds_to_sleep = 60
unless (tries -= 1).zero?
msg = "App Store Connect temporary error received: '#{ex.message}'. Retrying after #{seconds_to_sleep} seconds (remaining: #{tries})..."
puts(msg)
logger.warn(msg)
- sleep(seconds_to_sleep) unless Object.const_defined?("SpecHelper")
+ sleep(seconds_to_sleep) unless Object.const_defined?(:SpecHelper)
retry
end
raise ex # re-raise the exception
rescue Spaceship::TunesClient::ITunesConnectPotentialServerError => ex
seconds_to_sleep = 10
unless (potential_server_error_tries -= 1).zero?
msg = "Potential server error received: '#{ex.message}'. Retrying after 10 seconds (remaining: #{potential_server_error_tries})..."
puts(msg)
logger.warn(msg)
- sleep(seconds_to_sleep) unless Object.const_defined?("SpecHelper")
+ sleep(seconds_to_sleep) unless Object.const_defined?(:SpecHelper)
retry
end
raise ex
end