55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
# File 'lib/fastlane/plugin/push_cert_alert/actions/check_push_certificate_action.rb', line 55
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: :expires_soon,
description: "Block that is called if the profile expires in less than the `active_days_limit`. Called with `certificate, days_remaining`",
optional: true,
type: Proc),
FastlaneCore::ConfigItem.new(key: :expired,
description: "Block that is called if the profile is expired. Called with empty params",
optional: true,
type: Proc),
FastlaneCore::ConfigItem.new(key: :active_days_limit,
env_name: "PEM_ACTIVE_DAYS_LIMIT",
description: "If the current certificate is active for less than this number of days, generate a new one",
default_value: 30,
is_string: false,
type: Integer,
verify_block: proc do |value|
UI.user_error!("Value of active_days_limit must be a positive integer or left blank") unless value.kind_of?(Integer) && value > 0
end),
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: :website_push,
env_name: "PEM_WEBSITE_PUSH",
description: "Create a Website Push certificate",
is_string: false,
conflicting_options: [:development],
default_value: false),
FastlaneCore::ConfigItem.new(key: :app_identifier,
short_option: "-a",
env_name: "PEM_APP_IDENTIFIER",
description: "The bundle identifier of your app",
code_gen_sensitive: true,
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier),
default_value_dynamic: true),
FastlaneCore::ConfigItem.new(key: :username,
short_option: "-u",
env_name: "PEM_USERNAME",
description: "Your Apple ID Username",
default_value: user,
default_value_dynamic: true),
FastlaneCore::ConfigItem.new(key: :team_id,
short_option: "-b",
env_name: "PEM_TEAM_ID",
code_gen_sensitive: true,
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
default_value_dynamic: true,
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: :skip_slack,
description: "Skip sending an alert to Slack",
optional: true,
type: Boolean,
default_value: false),
FastlaneCore::ConfigItem.new(key: :slack_url,
short_option: "-i",
env_name: "SLACK_URL",
sensitive: true,
description: "Create an Incoming WebHook for your Slack group to post results there",
optional: true,
verify_block: proc do |value|
if !value.to_s.empty? && !value.start_with?("https://")
UI.user_error!("Invalid URL, must start with https://")
end
end),
FastlaneCore::ConfigItem.new(key: :slack_channel,
short_option: "-e",
env_name: "SCAN_SLACK_CHANNEL",
description: "#channel or @username",
optional: true)
]
end
|