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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
# File 'lib/fastlane/plugin/zealot/actions/zealot_action.rb', line 64
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :endpoint,
env_name: 'ZEALOT_ENDPOINT',
description: 'The endpoint of zealot',
type: String),
FastlaneCore::ConfigItem.new(key: :token,
env_name: 'ZEALOT_TOKEN',
description: 'The token of user',
sensitive: true,
verify_block: proc do |value|
UI.user_error!("No user token for Zealot given, pass using `token: 'token'`") if value.nil? || value.empty?
end,
type: String),
FastlaneCore::ConfigItem.new(key: :channel_key,
env_name: 'ZEALOT_CHANNEL_KEY',
description: 'The key of app\'s channel',
type: String),
FastlaneCore::ConfigItem.new(key: :file,
env_name: 'ZEALOT_FILE',
description: 'The path of app file. Optional if you use the `gym`, `ipa`, `xcodebuild` or `gradle` action. ',
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir['*.ipa'].last || Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || Dir['*.apk'].last,
verify_block: proc do |value|
UI.user_error!("Couldn't pass empty to file") if value.nil? || value.empty?
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
end,
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :name,
env_name: 'ZEALOT_NAME',
description: 'The name of app to display on zealot',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :changelog,
env_name: 'ZEALOT_CHANGELOG',
description: 'The changelog of app',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :slug,
env_name: 'ZEALOT_SLUG',
description: 'The slug of app',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :release_type,
env_name: 'ZEALOT_RELEASE_TYPE',
description: 'The release type of app',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :branch,
env_name: 'ZEALOT_BRANCH',
description: 'The name of git branch',
default_value: ENV['GIT_BRANCH'] || ENV['CI_COMMIT_REF_NAME'] || ENV['CI_BUILD_REF_NAME'],
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :git_commit,
env_name: 'ZEALOT_GIT_COMMIT',
description: 'The hash of git commit',
optional: true,
default_value: ENV['GIT_COMMIT'] || ENV['CI_COMMIT_SHA'] || ENV['CI_BUILD_REF'],
type: String),
FastlaneCore::ConfigItem.new(key: :custom_fields,
env_name: 'ZEALOT_CUSTOM_FIELDS',
description: 'The key-value hash of custom fields',
optional: true,
type: Array),
FastlaneCore::ConfigItem.new(key: :password,
env_name: 'ZEALOT_PASSWORD',
description: 'The password of app to download',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :source,
env_name: 'ZEALOT_SOURCE',
description: 'The name of upload source',
optional: true,
default_value: 'fastlane',
type: String),
FastlaneCore::ConfigItem.new(key: :ci_url,
env_name: 'ZEALOT_CI_CURL',
description: 'The name of upload source',
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :timeout,
env_name: 'ZEALOT_TIMEOUT',
description: 'Request timeout in seconds',
type: Integer,
optional: true),
FastlaneCore::ConfigItem.new(key: :hide_user_token,
env_name: 'ZEALOT_HIDE_USER_TOKEN',
description: 'replase user token to *** to keep secret',
optional: true,
default_value: true,
type: Boolean),
FastlaneCore::ConfigItem.new(key: :verify_ssl,
env_name: 'ZEALOT_VERIFY_SSL',
description: 'Should verify SSL of zealot service',
optional: true,
default_value: true,
type: Boolean),
FastlaneCore::ConfigItem.new(key: :fail_on_error,
env_name: 'ZEALOT_FAIL_ON_ERROR',
description: 'Should an error uploading app cause a failure',
optional: true,
default_value: false,
type: Boolean)
]
end
|