lib/pilot/manager.rb in pilot-1.4.1 vs lib/pilot/manager.rb in pilot-1.5.0
- old
+ new
@@ -9,23 +9,23 @@
end
def login
config[:username] ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
- Helper.log.info "Login to iTunes Connect (#{config[:username]})"
+ UI.message("Login to iTunes Connect (#{config[:username]})")
Spaceship::Tunes.login(config[:username])
Spaceship::Tunes.select_team
- Helper.log.info "Login successful"
+ UI.message("Login successful")
end
# The app object we're currently using
def app
@apple_id ||= fetch_app_id
@app ||= Spaceship::Application.find(@apple_id)
unless @app
- raise "Could not find app with #{(config[:apple_id] || config[:app_identifier])}"
+ UI.user_error!("Could not find app with #{(config[:apple_id] || config[:app_identifier])}")
end
return @app
end
# Access the current configuration
@@ -38,11 +38,11 @@
return @apple_id if @apple_id
config[:app_identifier] = fetch_app_identifier
if config[:app_identifier]
@app ||= Spaceship::Application.find(config[:app_identifier])
- raise "Couldn't find app '#{config[:app_identifier]}' on the account of '#{config[:username]}' on iTunes Connect".red unless @app
+ UI.user_error!("Couldn't find app '#{config[:app_identifier]}' on the account of '#{config[:username]}' on iTunes Connect") unless @app
app_id ||= @app.apple_id
end
app_id ||= ask("Could not automatically find the app ID, please enter it here (e.g. 956814360): ")
@@ -51,9 +51,10 @@
def fetch_app_identifier
result = config[:app_identifier]
result ||= FastlaneCore::IpaFileAnalyser.fetch_app_identifier(config[:ipa])
result ||= ask("Please enter the app's bundle identifier: ")
+ UI.verbose("App identifier (#{result})")
return result
end
end
end