Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regression][pilot] Fix upload using api_key_path + apple_id CLI options #18860

Merged
Merged
3 changes: 0 additions & 3 deletions pilot/lib/pilot/build_manager.rb
Expand Up @@ -366,9 +366,6 @@ def expire_previous_builds(build)
# If there are multiple teams, infer the provider from the selected team name.
# If there are fewer than two teams, don't infer the provider.
def transporter_for_selected_team(options)
# Ensure that user is authenticated
start(options)

# Use JWT auth
api_token = Spaceship::ConnectAPI.token
unless api_token.nil?
Expand Down
6 changes: 5 additions & 1 deletion pilot/lib/pilot/manager.rb
Expand Up @@ -13,7 +13,11 @@ class Manager
def start(options, should_login: true)
return if @config # to not login multiple times
@config = options
login if should_login

# we will always start with App Store Connect API login if required and possible
# else fallback to 'should_login' param for 'apple_id' login
should_login_for_appstore_connect_api = Spaceship::ConnectAPI.token.nil? && (options[:api_key_path] || options[:api_key])
crazymanish marked this conversation as resolved.
Show resolved Hide resolved
login if should_login_for_appstore_connect_api || should_login
end

def login
Expand Down