Class: PEM::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/pem/options.rb

Class Method Summary collapse

Class Method Details

.available_optionsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/pem/options.rb', line 6

def self.available_options
  user = CredentialsManager::AppfileConfig.try_fetch_value(:apple_dev_portal_id)
  user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)

  [
    FastlaneCore::ConfigItem.new(key: :development,
                                 env_name: "PEM_DEVELOPMENT",
                                 description: "Renew the development push certificate instead of the production one",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :generate_p12,
                                 env_name: "PEM_GENERATE_P12_FILE",
                                 description: "Generate a p12 file additionally to a PEM file",
                                 is_string: false,
                                 default_value: true),
    FastlaneCore::ConfigItem.new(key: :force,
                                 env_name: "PEM_FORCE",
                                 description: "Create a new push certificate, even if the current one is active for 30 more days",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :save_private_key,
                                 short_option: "-s",
                                 env_name: "PEM_SAVE_PRIVATEKEY",
                                 description: "Set to save the private RSA key",
                                 is_string: false,
                                 default_value: true),
    FastlaneCore::ConfigItem.new(key: :app_identifier,
                                 short_option: "-a",
                                 env_name: "PEM_APP_IDENTIFIER",
                                 description: "The bundle identifier of your app",
                                 default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
    FastlaneCore::ConfigItem.new(key: :username,
                                 short_option: "-u",
                                 env_name: "PEM_USERNAME",
                                 description: "Your Apple ID Username",
                                 default_value: user),
    FastlaneCore::ConfigItem.new(key: :team_id,
                                 short_option: "-b",
                                 env_name: "PEM_TEAM_ID",
                                 default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
                                 description: "The ID of your Developer Portal team if you're in multiple teams",
                                 optional: true,
                                 verify_block: proc do |value|
                                   ENV["FASTLANE_TEAM_ID"] = value.to_s
                                 end),
    FastlaneCore::ConfigItem.new(key: :team_name,
                                 short_option: "-l",
                                 env_name: "PEM_TEAM_NAME",
                                 description: "The name of your Developer Portal team if you're in multiple teams",
                                 optional: true,
                                 default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_name),
                                 verify_block: proc do |value|
                                   ENV["FASTLANE_TEAM_NAME"] = value.to_s
                                 end),
    FastlaneCore::ConfigItem.new(key: :p12_password,
                                 short_option: "-p",
                                 env_name: "PEM_P12_PASSWORD",
                                 sensitive: true,
                                 description: "The password that is used for your p12 file",
                                 default_value: ""),
    FastlaneCore::ConfigItem.new(key: :pem_name,
                                 short_option: "-o",
                                 env_name: "PEM_FILE_NAME",
                                 description: "The file name of the generated .pem file",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :output_path,
                                 short_option: "-e",
                                 env_name: "PEM_OUTPUT_PATH",
                                 description: "The path to a directory in which all certificates and private keys should be stored",
                                 default_value: ".")
  ]
end