Method: Pilot::TesterExporter#find_app

Defined in:
pilot/lib/pilot/tester_exporter.rb

#find_app(apple_id: nil, app_identifier: nil) ⇒ Object

[View source]

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'pilot/lib/pilot/tester_exporter.rb', line 42

def find_app(apple_id: nil, app_identifier: nil)
  if app_identifier
    app = Spaceship::ConnectAPI::App.find(app_identifier)
    UI.user_error!("Could not find an app by #{app_identifier}") unless app
    return app
  end

  if apple_id
    app = Spaceship::ConnectAPI::App.get(app_id: apple_id)
    UI.user_error!("Could not find an app by #{apple_id}") unless app
    return app
  end

  UI.user_error!("You must include an `app_identifier` to `list_testers`")
end