You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# See https://github.a8c.com/Automattic/wpcom/blob/trunk/wp-content/lib/a8c/cdn/src/enums/enum-build-type.php
23
+
VALID_BUILD_TYPES=%w[
24
+
Alpha
25
+
Beta
26
+
Nightly
27
+
Production
28
+
Prototype
29
+
].freeze
30
+
# See https://github.a8c.com/Automattic/wpcom/blob/trunk/wp-content/lib/a8c/cdn/src/enums/enum-platform.php
31
+
VALID_PLATFORMS=[
32
+
'Android',
33
+
'iOS',
34
+
'Mac - Silicon',
35
+
'Mac - Intel',
36
+
'Mac - Any',
37
+
'Windows',
38
+
'Microsoft Store',
39
+
].freeze
40
+
# See https://github.a8c.com/Automattic/wpcom/blob/trunk/wp-content/lib/a8c/cdn/src/enums/enum-install-type.php
41
+
VALID_INSTALL_TYPES=[
42
+
'Full Install',
43
+
'Update',
44
+
].freeze
45
+
# See https://github.a8c.com/Automattic/wpcom/blob/trunk/wp-content/lib/a8c/cdn/src/enums/enum-visibility.php
46
+
VALID_VISIBILITIES=%i[internalexternal].freeze
23
47
24
48
defself.run(params)
25
49
UI.message('Uploading build to Apps CDN...')
@@ -179,6 +203,8 @@ def self.available_options
179
203
type: String,
180
204
verify_block: procdo |value|
181
205
UI.user_error!('Product cannot be empty')ifvalue.to_s.empty?
206
+
# Unlike for other parameters, we don't validate the product value against a list of valid values because we expect this list of
207
+
# supported products to be updated on the backend from time to time and we don't want to have to update the toolkit every time for it.
182
208
end
183
209
),
184
210
FastlaneCore::ConfigItem.new(
@@ -228,7 +254,7 @@ def self.available_options
228
254
optional: false,
229
255
type: Symbol,
230
256
verify_block: procdo |value|
231
-
UI.user_error!('Visibility must be either :internal or :external')unless%i[internalexternal].include?(value)
257
+
UI.user_error!("Visibility must be one of: #{VALID_VISIBILITIES.map{"`:#{_1}`"}.join(', ')}")unlessVALID_VISIBILITIES.include?(value.to_s.downcase.to_sym)
end.toraise_error(FastlaneCore::Interface::FastlaneError,'Platform must be one of: Android, iOS, Mac - Silicon, Mac - Intel, Mac - Any, Windows')
424
+
end.toraise_error(FastlaneCore::Interface::FastlaneError,'Platform must be one of: Android, iOS, Mac - Silicon, Mac - Intel, Mac - Any, Windows, Microsoft Store')
0 commit comments