Class: Cert::Options

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

Class Method Summary collapse

Class Method Details

.available_optionsObject



5
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
# File 'lib/cert/options.rb', line 5

def self.available_options
  @@options ||= [
    FastlaneCore::ConfigItem.new(key: :development,
                                 env_name: "CERT_DEVELOPMENT",
                                 description: "Create a development certificate instead of a distribution one",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :username,
                                 short_option: "-u",
                                 env_name: "CERT_USERNAME",
                                 description: "Your Apple ID Username",
                                 default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
    FastlaneCore::ConfigItem.new(key: :team_id,
                                 short_option: "-b",
                                 env_name: "CERT_TEAM_ID",
                                 description: "The ID of your team if you're in multiple teams",
                                 optional: true,
                                 verify_block: proc do |value|
                                   ENV["FASTLANE_TEAM_ID"] = value
                                 end),
    FastlaneCore::ConfigItem.new(key: :output_path,
                                 short_option: "-o",
                                 env_name: "CERT_OUTPUT_PATH",
                                 description: "The path to a directory in which all certificates and private keys should be stored",
                                 default_value: "."),
    FastlaneCore::ConfigItem.new(key: :keychain_path,
                                 short_option: "-k",
                                 env_name: "CERT_KEYCHAIN_PATH",
                                 description: "Path to a custom keychain",
                                 optional: true,
                                 verify_block: proc do |value|
                                   raise "Keychain not found at path '#{value}'".red unless File.exist? value
                                 end),
    FastlaneCore::ConfigItem.new(key: :signing_request_path,
                                 short_option: "-s",
                                 env_name: "CERT_SIGNING_REQUEST_PATH",
                                 description: "Path to a signing request file (optional)",
                                 optional: true,
                                 verify_block: proc do |value|
                                   raise "File not found at path '#{value}'".red unless File.exist? value
                                 end)
  ]
end