fastlane 2.183.2 → 2.184.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -88
- data/cert/lib/cert/runner.rb +3 -7
- data/deliver/lib/deliver/commands_generator.rb +1 -1
- data/deliver/lib/deliver/detect_values.rb +5 -3
- data/deliver/lib/deliver/download_screenshots.rb +1 -1
- data/deliver/lib/deliver/html_generator.rb +2 -2
- data/deliver/lib/deliver/module.rb +6 -0
- data/deliver/lib/deliver/options.rb +36 -51
- data/deliver/lib/deliver/runner.rb +8 -11
- data/deliver/lib/deliver/setup.rb +1 -1
- data/deliver/lib/deliver/submit_for_review.rb +1 -1
- data/deliver/lib/deliver/upload_metadata.rb +19 -5
- data/deliver/lib/deliver/upload_price_tier.rb +1 -1
- data/deliver/lib/deliver/upload_screenshots.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +7 -11
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +12 -2
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +5 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +32 -12
- data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +5 -1
- data/fastlane/lib/fastlane/actions/register_device.rb +7 -10
- data/fastlane/lib/fastlane/actions/register_devices.rb +7 -10
- data/fastlane/lib/fastlane/actions/set_changelog.rb +7 -10
- data/fastlane/lib/fastlane/actions/swiftlint.rb +16 -4
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +6 -1
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +2 -1
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +6 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +20 -20
- data/fastlane/swift/Fastlane.swift +462 -240
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/OptionalConfigValue.swift +2 -32
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +2 -2
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +24 -1
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +5 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +2 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +1 -1
- data/match/lib/match/importer.rb +6 -10
- data/match/lib/match/migrate.rb +2 -3
- data/match/lib/match/nuke.rb +3 -7
- data/match/lib/match/runner.rb +2 -3
- data/match/lib/match/spaceship_ensure.rb +3 -0
- data/match/lib/match/storage/google_cloud_storage.rb +2 -2
- data/match/lib/match/storage/s3_storage.rb +2 -2
- data/pilot/lib/pilot/build_manager.rb +2 -0
- data/pilot/lib/pilot/manager.rb +3 -7
- data/pilot/lib/pilot/options.rb +8 -0
- data/precheck/lib/precheck/runner.rb +8 -7
- data/sigh/lib/assets/resign.sh +77 -46
- data/sigh/lib/sigh/download_all.rb +4 -8
- data/sigh/lib/sigh/runner.rb +4 -8
- data/spaceship/lib/spaceship/connect_api/models/.age_rating_declaration.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +35 -4
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +10 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +2 -3
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +4 -2
- metadata +19 -18
@@ -23,38 +23,6 @@ public enum OptionalConfigValue<T> {
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
-
extension Optional: ExpressibleByIntegerLiteral where Wrapped: ExpressibleByIntegerLiteral {
|
27
|
-
public typealias IntegerLiteralType = Wrapped.IntegerLiteralType
|
28
|
-
|
29
|
-
public init(integerLiteral value: Wrapped.IntegerLiteralType) {
|
30
|
-
self = .some(.init(integerLiteral: value))
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
extension Optional: ExpressibleByUnicodeScalarLiteral where Wrapped: ExpressibleByUnicodeScalarLiteral {
|
35
|
-
public typealias UnicodeScalarLiteralType = Wrapped.UnicodeScalarLiteralType
|
36
|
-
|
37
|
-
public init(unicodeScalarLiteral value: Wrapped.UnicodeScalarLiteralType) {
|
38
|
-
self = .some(.init(unicodeScalarLiteral: value))
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
extension Optional: ExpressibleByExtendedGraphemeClusterLiteral where Wrapped: ExpressibleByStringLiteral {
|
43
|
-
public typealias ExtendedGraphemeClusterLiteralType = Wrapped.ExtendedGraphemeClusterLiteralType
|
44
|
-
|
45
|
-
public init(extendedGraphemeClusterLiteral value: Wrapped.ExtendedGraphemeClusterLiteralType) {
|
46
|
-
self = .some(.init(extendedGraphemeClusterLiteral: value))
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
extension Optional: ExpressibleByStringLiteral where Wrapped: ExpressibleByStringLiteral {
|
51
|
-
public typealias StringLiteralType = Wrapped.StringLiteralType
|
52
|
-
|
53
|
-
public init(stringLiteral value: Wrapped.StringLiteralType) {
|
54
|
-
self = .some(.init(stringLiteral: value))
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
26
|
extension OptionalConfigValue: ExpressibleByUnicodeScalarLiteral where T == String? {
|
59
27
|
public typealias UnicodeScalarLiteralType = String
|
60
28
|
|
@@ -79,6 +47,8 @@ extension OptionalConfigValue: ExpressibleByStringLiteral where T == String? {
|
|
79
47
|
}
|
80
48
|
}
|
81
49
|
|
50
|
+
extension OptionalConfigValue: ExpressibleByStringInterpolation where T == String? {}
|
51
|
+
|
82
52
|
extension OptionalConfigValue: ExpressibleByNilLiteral {
|
83
53
|
public init(nilLiteral _: ()) {
|
84
54
|
self = .nil
|
@@ -35,9 +35,9 @@
|
|
35
35
|
"system": {
|
36
36
|
"macos": {
|
37
37
|
"catalina": {
|
38
|
-
"HOMEBREW_VERSION": "3.1.
|
38
|
+
"HOMEBREW_VERSION": "3.1.8-62-gc278da1",
|
39
39
|
"HOMEBREW_PREFIX": "/usr/local",
|
40
|
-
"Homebrew/homebrew-core": "
|
40
|
+
"Homebrew/homebrew-core": "decc1c2cbcdbaf86c19d95899ebecea59c8ce3ac",
|
41
41
|
"CLT": "11.0.0.33.12",
|
42
42
|
"Xcode": "12.4",
|
43
43
|
"macOS": "10.15.7"
|
@@ -11,7 +11,7 @@ module FastlaneCore
|
|
11
11
|
|
12
12
|
class << self
|
13
13
|
# @return The build we waited for. This method will always return a build
|
14
|
-
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
14
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
15
15
|
# Warn about train_version being removed in the future
|
16
16
|
if train_version
|
17
17
|
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
@@ -26,6 +26,12 @@ module FastlaneCore
|
|
26
26
|
platform = Spaceship::ConnectAPI::Platform.map(platform) if platform
|
27
27
|
UI.message("Waiting for processing on... app_id: #{app_id}, app_version: #{app_version}, build_version: #{build_version}, platform: #{platform}")
|
28
28
|
|
29
|
+
build_watching_start_time = Time.new
|
30
|
+
unless timeout_duration.nil?
|
31
|
+
end_time = build_watching_start_time + timeout_duration
|
32
|
+
UI.message("Will timeout watching build after #{timeout_duration} seconds around #{end_time}...")
|
33
|
+
end
|
34
|
+
|
29
35
|
showed_info = false
|
30
36
|
loop do
|
31
37
|
matched_build, app_version_queried = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
|
@@ -56,6 +62,9 @@ module FastlaneCore
|
|
56
62
|
end
|
57
63
|
end
|
58
64
|
|
65
|
+
# Before next poll, force stop build watching, if we exceeded the 'timeout_duration' waiting time
|
66
|
+
force_stop_build_watching_if_required(start_time: build_watching_start_time, timeout_duration: timeout_duration)
|
67
|
+
|
59
68
|
sleep(poll_interval)
|
60
69
|
end
|
61
70
|
end
|
@@ -145,6 +154,20 @@ module FastlaneCore
|
|
145
154
|
UI.message("Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)")
|
146
155
|
end
|
147
156
|
end
|
157
|
+
|
158
|
+
def force_stop_build_watching_if_required(start_time: nil, timeout_duration: nil)
|
159
|
+
return if start_time.nil? || timeout_duration.nil? # keep watching build for App Store Connect processing
|
160
|
+
|
161
|
+
current_time = Time.new
|
162
|
+
end_time = start_time + timeout_duration
|
163
|
+
pending_duration = end_time - current_time
|
164
|
+
|
165
|
+
if current_time > end_time
|
166
|
+
UI.crash!("FastlaneCore::BuildWatcher exceeded the '#{timeout_duration.to_i}' seconds, Stopping now!")
|
167
|
+
else
|
168
|
+
UI.verbose("Will timeout watching build after pending #{pending_duration.to_i} seconds around #{end_time}...")
|
169
|
+
end
|
170
|
+
end
|
148
171
|
end
|
149
172
|
end
|
150
173
|
end
|
@@ -30,6 +30,11 @@ module FastlaneCore
|
|
30
30
|
type = option.is_string ? String : nil
|
31
31
|
end
|
32
32
|
|
33
|
+
# OptionParser doesn't like symbol but a symbol and string can be easily cast with `to_sym` and `to_s`
|
34
|
+
if type == Symbol
|
35
|
+
type = String
|
36
|
+
end
|
37
|
+
|
33
38
|
# Boolean is a fastlane thing, it's either TrueClass, or FalseClass, but we won't know
|
34
39
|
# that until runtime, so nil is the best we get
|
35
40
|
if type == Fastlane::Boolean
|
@@ -262,6 +262,8 @@ module FastlaneCore
|
|
262
262
|
return value.to_i if value.to_i.to_s == value.to_s
|
263
263
|
elsif data_type == Float
|
264
264
|
return value.to_f if value.to_f.to_s == value.to_s
|
265
|
+
elsif data_type == Symbol
|
266
|
+
return value.to_sym if value.to_sym.to_s == value.to_s
|
265
267
|
elsif allow_shell_conversion
|
266
268
|
return value.shelljoin if value.kind_of?(Array)
|
267
269
|
return value.map { |k, v| "#{k.to_s.shellescape}=#{v.shellescape}" }.join(' ') if value.kind_of?(Hash)
|
@@ -212,7 +212,7 @@ module FastlaneCore
|
|
212
212
|
# if 'force_ask' is true, the option is not required to be optional to ask
|
213
213
|
# rubocop:disable Metrics/PerceivedComplexity
|
214
214
|
def fetch(key, ask: true, force_ask: false)
|
215
|
-
UI.crash!("Key '#{key}' must be a symbol. Example
|
215
|
+
UI.crash!("Key '#{key}' must be a symbol. Example :#{key}") unless key.kind_of?(Symbol)
|
216
216
|
|
217
217
|
option = verify_options_key!(key)
|
218
218
|
|
data/match/lib/match/importer.rb
CHANGED
@@ -93,15 +93,17 @@ module Match
|
|
93
93
|
dest_cert_path = File.join(output_dir_certs, "#{cert_name}.cer")
|
94
94
|
dest_p12_path = File.join(output_dir_certs, "#{p12_name}.p12")
|
95
95
|
else
|
96
|
-
|
97
|
-
token = api_token(params)
|
98
|
-
if token
|
96
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
99
97
|
UI.message("Creating authorization token for App Store Connect API")
|
100
|
-
Spaceship::ConnectAPI.token =
|
98
|
+
Spaceship::ConnectAPI.token = api_token
|
99
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
100
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
101
101
|
else
|
102
102
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
103
103
|
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
104
104
|
end
|
105
|
+
|
106
|
+
# Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
|
105
107
|
certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
|
106
108
|
|
107
109
|
# Base64 encode contents to find match from API to find a cert ID
|
@@ -147,11 +149,5 @@ module Match
|
|
147
149
|
UI.user_error!("#{file_description} does not exist at path: #{file_path}") unless !file_path.nil? || optional
|
148
150
|
file_path
|
149
151
|
end
|
150
|
-
|
151
|
-
def api_token(params)
|
152
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
153
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
154
|
-
return @api_token
|
155
|
-
end
|
156
152
|
end
|
157
153
|
end
|
data/match/lib/match/migrate.rb
CHANGED
@@ -91,9 +91,8 @@ module Match
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def api_token(params)
|
94
|
-
|
95
|
-
|
96
|
-
return @api_token
|
94
|
+
api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path])
|
95
|
+
return api_token
|
97
96
|
end
|
98
97
|
|
99
98
|
def ensure_parameters_are_valid(params)
|
data/match/lib/match/nuke.rb
CHANGED
@@ -102,9 +102,11 @@ module Match
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def spaceship_login
|
105
|
-
if api_token
|
105
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
106
106
|
UI.message("Creating authorization token for App Store Connect API")
|
107
107
|
Spaceship::ConnectAPI.token = api_token
|
108
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
109
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
108
110
|
else
|
109
111
|
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
110
112
|
end
|
@@ -120,12 +122,6 @@ module Match
|
|
120
122
|
end
|
121
123
|
end
|
122
124
|
|
123
|
-
def api_token
|
124
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
125
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
126
|
-
return @api_token
|
127
|
-
end
|
128
|
-
|
129
125
|
# Collect all the certs/profiles
|
130
126
|
def prepare_list
|
131
127
|
UI.message("Fetching certificates and profiles...")
|
data/match/lib/match/runner.rb
CHANGED
@@ -139,9 +139,8 @@ module Match
|
|
139
139
|
# rubocop:enable Metrics/PerceivedComplexity
|
140
140
|
|
141
141
|
def api_token(params)
|
142
|
-
|
143
|
-
|
144
|
-
return @api_token
|
142
|
+
api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path])
|
143
|
+
return api_token
|
145
144
|
end
|
146
145
|
|
147
146
|
# Used when creating a new certificate or profile
|
@@ -13,6 +13,9 @@ module Match
|
|
13
13
|
UI.message("Creating authorization token for App Store Connect API")
|
14
14
|
Spaceship::ConnectAPI.token = api_token
|
15
15
|
self.team_id = team_id
|
16
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
17
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
18
|
+
self.team_id = team_id
|
16
19
|
else
|
17
20
|
# We'll try to manually fetch the password
|
18
21
|
# to tell the user that a password is optional
|
@@ -123,8 +123,8 @@ module Match
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def api_token
|
126
|
-
api_token
|
127
|
-
api_token ||= Spaceship::ConnectAPI
|
126
|
+
api_token = Spaceship::ConnectAPI::Token.from(hash: self.api_key, filepath: self.api_key_path)
|
127
|
+
api_token ||= Spaceship::ConnectAPI.token
|
128
128
|
return api_token
|
129
129
|
end
|
130
130
|
|
@@ -196,8 +196,8 @@ module Match
|
|
196
196
|
end
|
197
197
|
|
198
198
|
def api_token
|
199
|
-
api_token
|
200
|
-
api_token ||= Spaceship::ConnectAPI
|
199
|
+
api_token = Spaceship::ConnectAPI::Token.from(hash: self.api_key, filepath: self.api_key_path)
|
200
|
+
api_token ||= Spaceship::ConnectAPI.token
|
201
201
|
return api_token
|
202
202
|
end
|
203
203
|
end
|
@@ -105,6 +105,7 @@ module Pilot
|
|
105
105
|
app_version: app_version,
|
106
106
|
build_version: app_build,
|
107
107
|
poll_interval: config[:wait_processing_interval],
|
108
|
+
timeout_duration: config[:wait_processing_timeout_duration],
|
108
109
|
return_when_build_appears: return_when_build_appears,
|
109
110
|
return_spaceship_testflight_build: false
|
110
111
|
)
|
@@ -365,6 +366,7 @@ module Pilot
|
|
365
366
|
# If there are fewer than two teams, don't infer the provider.
|
366
367
|
def transporter_for_selected_team(options)
|
367
368
|
# Use JWT auth
|
369
|
+
api_token = Spaceship::ConnectAPI.token
|
368
370
|
unless api_token.nil?
|
369
371
|
api_token.refresh! if api_token.expired?
|
370
372
|
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
|
data/pilot/lib/pilot/manager.rb
CHANGED
@@ -17,9 +17,11 @@ module Pilot
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def login
|
20
|
-
if api_token
|
20
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: config[:api_key], filepath: config[:api_key_path]))
|
21
21
|
UI.message("Creating authorization token for App Store Connect API")
|
22
22
|
Spaceship::ConnectAPI.token = api_token
|
23
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
24
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
23
25
|
else
|
24
26
|
config[:username] ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
25
27
|
|
@@ -33,12 +35,6 @@ module Pilot
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
36
|
-
def api_token
|
37
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**config[:api_key]) if config[:api_key]
|
38
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(config[:api_key_path]) if config[:api_key_path]
|
39
|
-
return @api_token
|
40
|
-
end
|
41
|
-
|
42
38
|
# The app object we're currently using
|
43
39
|
def app
|
44
40
|
@app_id ||= fetch_app_id
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -286,6 +286,14 @@ module Pilot
|
|
286
286
|
verify_block: proc do |value|
|
287
287
|
UI.user_error!("Please enter a valid positive number of seconds") unless value.to_i > 0
|
288
288
|
end),
|
289
|
+
FastlaneCore::ConfigItem.new(key: :wait_processing_timeout_duration,
|
290
|
+
env_name: "PILOT_WAIT_PROCESSING_TIMEOUT_DURATION",
|
291
|
+
description: "Timeout duration in seconds to wait for App Store Connect processing. If set, after exceeding timeout duration, this will `force stop` to wait for App Store Connect processing and exit with exception",
|
292
|
+
optional: true,
|
293
|
+
type: Integer,
|
294
|
+
verify_block: proc do |value|
|
295
|
+
UI.user_error!("Please enter a valid positive number of seconds") unless value.to_i > 0
|
296
|
+
end),
|
289
297
|
FastlaneCore::ConfigItem.new(key: :wait_for_uploaded_build,
|
290
298
|
env_name: "PILOT_WAIT_FOR_UPLOADED_BUILD",
|
291
299
|
deprecated: "No longer needed with the transition over to the App Store Connect API",
|
@@ -18,6 +18,14 @@ module Precheck
|
|
18
18
|
hide_keys: [:output_path],
|
19
19
|
title: "Summary for precheck #{Fastlane::VERSION}")
|
20
20
|
|
21
|
+
api_token = if (token = Spaceship::ConnectAPI::Token.from(hash: Precheck.config[:api_key], filepath: Precheck.config[:api_key_path]))
|
22
|
+
UI.message("Creating authorization token for App Store Connect API")
|
23
|
+
token
|
24
|
+
elsif (token = Spaceship::ConnectAPI.token)
|
25
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
26
|
+
token
|
27
|
+
end
|
28
|
+
|
21
29
|
if api_token
|
22
30
|
|
23
31
|
# As of 2020-09-15, App Store Connect API does not have support for IAPs yet
|
@@ -29,7 +37,6 @@ module Precheck
|
|
29
37
|
UI.user_error!("Precheck cannot check In-app purchases with the App Store Connect API Key (yet). Exclude In-app purchases from precheck, disable the precheck step in your build step, or use Apple ID login")
|
30
38
|
end
|
31
39
|
|
32
|
-
UI.message("Creating authorization token for App Store Connect API")
|
33
40
|
Spaceship::ConnectAPI.token = api_token
|
34
41
|
elsif Spaceship::Tunes.client.nil?
|
35
42
|
# Username is now optional since addition of App Store Connect API Key
|
@@ -75,12 +82,6 @@ module Precheck
|
|
75
82
|
return true
|
76
83
|
end
|
77
84
|
|
78
|
-
def api_token
|
79
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**Precheck.config[:api_key]) if Precheck.config[:api_key]
|
80
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(Precheck.config[:api_key_path]) if Precheck.config[:api_key_path]
|
81
|
-
return @api_token
|
82
|
-
end
|
83
|
-
|
84
85
|
def print_items_not_checked(processor_result: nil)
|
85
86
|
names = processor_result.items_not_checked.map(&:friendly_name)
|
86
87
|
UI.message("😶 Metadata fields not checked by any rule: #{names.join(', ')}".yellow) if names.length > 0
|