lib/pilot/options.rb in pilot-1.0.1 vs lib/pilot/options.rb in pilot-1.1.0
- old
+ new
@@ -2,16 +2,19 @@
require "credentials_manager"
module Pilot
class Options
def self.available_options
- @options ||= [
+ user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
+ user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
+
+ [
FastlaneCore::ConfigItem.new(key: :username,
short_option: "-u",
env_name: "PILOT_USERNAME",
description: "Your Apple ID Username",
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
+ default_value: user),
FastlaneCore::ConfigItem.new(key: :app_identifier,
short_option: "-a",
env_name: "PILOT_APP_IDENTIFIER",
description: "The bundle identifier of the app to upload or manage testers (optional)",
optional: true,
@@ -73,9 +76,28 @@
description: "Interval in seconds to wait for iTunes Connect processing",
default_value: 30,
is_string: false,
verify_block: proc do |value|
raise "Please enter a valid positive number of seconds" unless value.to_i > 0
+ end),
+ FastlaneCore::ConfigItem.new(key: :team_id,
+ short_option: "-q",
+ env_name: "PILOT_TEAM_ID",
+ description: "The ID of your team if you're in multiple teams",
+ optional: true,
+ is_string: false, # as we also allow integers, which we convert to strings anyway
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
+ verify_block: proc do |value|
+ ENV["FASTLANE_ITC_TEAM_ID"] = value.to_s
+ end),
+ FastlaneCore::ConfigItem.new(key: :team_name,
+ short_option: "-r",
+ env_name: "PILOT_TEAM_NAME",
+ description: "The name of your team if you're in multiple teams",
+ optional: true,
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
+ verify_block: proc do |value|
+ ENV["FASTLANE_ITC_TEAM_NAME"] = value
end)
]
end
end