fastlane 2.201.1 → 2.204.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 +92 -92
- data/deliver/lib/deliver/runner.rb +19 -2
- data/deliver/lib/deliver/submit_for_review.rb +25 -3
- data/fastlane/lib/fastlane/actions/run_tests.rb +10 -2
- data/fastlane/lib/fastlane/actions/trainer.rb +2 -2
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
- data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +55 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +2 -2
- data/fastlane/swift/Fastlane.swift +197 -161
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +2 -2
- data/fastlane/swift/LaneFileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +6 -2
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
- data/fastlane/swift/Runner.swift +9 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +7 -3
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
- data/fastlane/swift/SocketClient.swift +5 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +19 -19
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
- data/match/lib/match/nuke.rb +33 -9
- data/match/lib/match/options.rb +5 -0
- data/match/lib/match/storage/s3_storage.rb +3 -3
- data/pilot/lib/pilot/build_manager.rb +17 -7
- data/pilot/lib/pilot/options.rb +6 -1
- data/scan/lib/scan/options.rb +6 -1
- data/scan/lib/scan/runner.rb +40 -13
- data/scan/lib/scan/test_command_generator.rb +8 -3
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +5 -1
- data/spaceship/lib/spaceship/connect_api/models/app.rb +2 -1
- metadata +24 -27
- data/fastlane/lib/fastlane/actions/.run_tests.rb.swp +0 -0
- data/scan/lib/scan/.error_handler.rb.swp +0 -0
- data/scan/lib/scan/.runner.rb.swp +0 -0
- data/trainer/lib/trainer/.options.rb.swp +0 -0
@@ -18,6 +18,11 @@ module Pilot
|
|
18
18
|
|
19
19
|
UI.user_error!("No ipa or pkg file given") if config[:ipa].nil? && config[:pkg].nil?
|
20
20
|
|
21
|
+
if config[:ipa] && config[:pkg]
|
22
|
+
UI.important("WARNING: Both `ipa` and `pkg` options are defined either explicitly or with default_value (build found in directory)")
|
23
|
+
UI.important("Uploading `ipa` is preferred by default. Set `app_platform` to `osx` to force uploading `pkg`")
|
24
|
+
end
|
25
|
+
|
21
26
|
check_for_changelog_or_whats_new!(options)
|
22
27
|
|
23
28
|
UI.success("Ready to upload new build to TestFlight (App: #{fetch_app_id})...")
|
@@ -25,24 +30,29 @@ module Pilot
|
|
25
30
|
dir = Dir.mktmpdir
|
26
31
|
|
27
32
|
platform = fetch_app_platform
|
28
|
-
|
33
|
+
ipa_path = options[:ipa]
|
34
|
+
if ipa_path && platform != 'osx'
|
35
|
+
asset_path = ipa_path
|
29
36
|
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id,
|
30
|
-
ipa_path:
|
37
|
+
ipa_path: ipa_path,
|
31
38
|
package_path: dir,
|
32
39
|
platform: platform)
|
33
40
|
else
|
41
|
+
pkg_path = options[:pkg]
|
42
|
+
asset_path = pkg_path
|
34
43
|
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(app_id: fetch_app_id,
|
35
|
-
pkg_path:
|
44
|
+
pkg_path: pkg_path,
|
36
45
|
package_path: dir,
|
37
46
|
platform: platform)
|
38
47
|
end
|
39
48
|
|
40
49
|
transporter = transporter_for_selected_team(options)
|
41
|
-
result = transporter.upload(package_path: package_path, asset_path:
|
50
|
+
result = transporter.upload(package_path: package_path, asset_path: asset_path)
|
42
51
|
|
43
52
|
unless result
|
44
53
|
transporter_errors = transporter.displayable_errors
|
45
|
-
|
54
|
+
file_type = platform == "osx" ? "pkg" : "ipa"
|
55
|
+
UI.user_error!("Error uploading #{file_type} file: \n #{transporter_errors}")
|
46
56
|
end
|
47
57
|
|
48
58
|
UI.success("Successfully uploaded the new binary to App Store Connect")
|
@@ -98,7 +108,7 @@ module Pilot
|
|
98
108
|
|
99
109
|
def wait_for_build_processing_to_be_complete(return_when_build_appears = false)
|
100
110
|
platform = fetch_app_platform
|
101
|
-
if config[:ipa]
|
111
|
+
if config[:ipa] && platform != "osx"
|
102
112
|
app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
|
103
113
|
app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
|
104
114
|
elsif config[:pkg]
|
@@ -410,7 +420,7 @@ module Pilot
|
|
410
420
|
# This is where we could add a check to see if encryption is required and has been updated
|
411
421
|
uploaded_build = set_export_compliance_if_needed(uploaded_build, options)
|
412
422
|
|
413
|
-
if options[:groups] || options[:distribute_external]
|
423
|
+
if options[:submit_beta_review] && (options[:groups] || options[:distribute_external])
|
414
424
|
if uploaded_build.ready_for_beta_submission?
|
415
425
|
uploaded_build.post_beta_app_review_submission
|
416
426
|
else
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -324,7 +324,12 @@ module Pilot
|
|
324
324
|
env_name: "PILOT_REJECT_PREVIOUS_BUILD",
|
325
325
|
description: "Expire previous if it's 'waiting for review'",
|
326
326
|
is_string: false,
|
327
|
-
default_value: false)
|
327
|
+
default_value: false),
|
328
|
+
FastlaneCore::ConfigItem.new(key: :submit_beta_review,
|
329
|
+
env_name: "PILOT_DISTRIBUTE_EXTERNAL",
|
330
|
+
description: "Send the build for a beta review",
|
331
|
+
type: Boolean,
|
332
|
+
default_value: true)
|
328
333
|
]
|
329
334
|
end
|
330
335
|
end
|
data/scan/lib/scan/options.rb
CHANGED
@@ -328,6 +328,11 @@ module Scan
|
|
328
328
|
default_value: false),
|
329
329
|
|
330
330
|
# concurrency
|
331
|
+
FastlaneCore::ConfigItem.new(key: :parallel_testing,
|
332
|
+
type: Boolean,
|
333
|
+
env_name: "SCAN_PARALLEL_TESTING",
|
334
|
+
description: "Optionally override the per-target setting in the scheme for running tests in parallel. Equivalent to -parallel-testing-enabled",
|
335
|
+
optional: true),
|
331
336
|
FastlaneCore::ConfigItem.new(key: :concurrent_workers,
|
332
337
|
type: Integer,
|
333
338
|
env_name: "SCAN_CONCURRENT_WORKERS",
|
@@ -515,7 +520,7 @@ module Scan
|
|
515
520
|
default_value: false),
|
516
521
|
FastlaneCore::ConfigItem.new(key: :number_of_retries,
|
517
522
|
env_name: 'SCAN_NUMBER_OF_RETRIES',
|
518
|
-
description: "The number of times a test can fail
|
523
|
+
description: "The number of times a test can fail",
|
519
524
|
type: Integer,
|
520
525
|
default_value: 0)
|
521
526
|
|
data/scan/lib/scan/runner.rb
CHANGED
@@ -20,7 +20,8 @@ module Scan
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def run
|
23
|
-
|
23
|
+
@xcresults_before_run = find_xcresults_in_derived_data
|
24
|
+
return handle_results(test_app)
|
24
25
|
end
|
25
26
|
|
26
27
|
def test_app
|
@@ -106,7 +107,7 @@ module Scan
|
|
106
107
|
tests = retryable_tests(error_output)
|
107
108
|
|
108
109
|
if tests.empty?
|
109
|
-
UI.
|
110
|
+
UI.build_failure!("Failed to find failed tests to retry (could not parse error output)")
|
110
111
|
end
|
111
112
|
|
112
113
|
Scan.config[:only_testing] = tests
|
@@ -172,21 +173,44 @@ module Scan
|
|
172
173
|
return find_filename('json-compilation-database')
|
173
174
|
end
|
174
175
|
|
176
|
+
def find_xcresults_in_derived_data
|
177
|
+
derived_data_path = Scan.config[:derived_data_path]
|
178
|
+
return [] if derived_data_path.nil? # Swift packages might not have derived data
|
179
|
+
|
180
|
+
xcresults_path = File.join(derived_data_path, "Logs", "Test", "*.xcresult")
|
181
|
+
return Dir[xcresults_path]
|
182
|
+
end
|
183
|
+
|
175
184
|
def trainer_test_results
|
176
185
|
require "trainer"
|
177
186
|
|
178
187
|
results = {
|
179
188
|
number_of_tests: 0,
|
180
189
|
number_of_failures: 0,
|
181
|
-
number_of_retries: 0
|
190
|
+
number_of_retries: 0,
|
191
|
+
number_of_tests_excluding_retries: 0,
|
192
|
+
number_of_failures_excluding_retries: 0
|
182
193
|
}
|
183
194
|
|
184
195
|
result_bundle_path = Scan.cache[:result_bundle_path]
|
185
196
|
|
197
|
+
# Looks for xcresult file in derived data if not specifically set
|
198
|
+
if result_bundle_path.nil?
|
199
|
+
xcresults = find_xcresults_in_derived_data
|
200
|
+
new_xcresults = xcresults - @xcresults_before_run
|
201
|
+
|
202
|
+
if new_xcresults.size != 1
|
203
|
+
UI.build_failure!("Cannot find .xcresult in derived data which is needed to determine test results. This is an issue within scan. File an issue on GitHub or try setting option `result_bundle: true`")
|
204
|
+
end
|
205
|
+
|
206
|
+
result_bundle_path = new_xcresults.first
|
207
|
+
Scan.cache[:result_bundle_path] = result_bundle_path
|
208
|
+
end
|
209
|
+
|
186
210
|
output_path = Scan.config[:output_directory] || Dir.mktmpdir
|
187
211
|
output_path = File.absolute_path(output_path)
|
188
212
|
|
189
|
-
UI.
|
213
|
+
UI.build_failure!("A -resultBundlePath is needed to parse the test results. This should not have happened. Please file an issue.") unless result_bundle_path
|
190
214
|
|
191
215
|
params = {
|
192
216
|
path: result_bundle_path,
|
@@ -222,8 +246,10 @@ module Scan
|
|
222
246
|
|
223
247
|
resulting_paths = Trainer::TestParser.auto_convert(params)
|
224
248
|
resulting_paths.each do |path, data|
|
225
|
-
results[:number_of_tests] += data[:
|
226
|
-
results[:number_of_failures] += data[:
|
249
|
+
results[:number_of_tests] += data[:number_of_tests]
|
250
|
+
results[:number_of_failures] += data[:number_of_failures]
|
251
|
+
results[:number_of_tests_excluding_retries] += data[:number_of_tests_excluding_retries]
|
252
|
+
results[:number_of_failures_excluding_retries] += data[:number_of_failures_excluding_retries]
|
227
253
|
results[:number_of_retries] += data[:number_of_retries]
|
228
254
|
end
|
229
255
|
|
@@ -231,13 +257,17 @@ module Scan
|
|
231
257
|
end
|
232
258
|
|
233
259
|
def handle_results(tests_exit_status)
|
234
|
-
|
260
|
+
copy_simulator_logs
|
261
|
+
zip_build_products
|
262
|
+
copy_xctestrun
|
263
|
+
|
264
|
+
return nil if Scan.config[:build_for_testing]
|
235
265
|
|
236
266
|
results = trainer_test_results
|
237
267
|
|
238
268
|
number_of_retries = results[:number_of_retries]
|
239
|
-
number_of_tests = results[:
|
240
|
-
number_of_failures = results[:
|
269
|
+
number_of_tests = results[:number_of_tests_excluding_retries]
|
270
|
+
number_of_failures = results[:number_of_failures_excluding_retries]
|
241
271
|
|
242
272
|
SlackPoster.new.run({
|
243
273
|
tests: number_of_tests,
|
@@ -268,10 +298,6 @@ module Scan
|
|
268
298
|
}))
|
269
299
|
puts("")
|
270
300
|
|
271
|
-
copy_simulator_logs
|
272
|
-
zip_build_products
|
273
|
-
copy_xctestrun
|
274
|
-
|
275
301
|
if number_of_failures > 0
|
276
302
|
open_report
|
277
303
|
|
@@ -283,6 +309,7 @@ module Scan
|
|
283
309
|
end
|
284
310
|
|
285
311
|
open_report
|
312
|
+
return results
|
286
313
|
end
|
287
314
|
|
288
315
|
def open_report
|
@@ -53,8 +53,9 @@ module Scan
|
|
53
53
|
if config[:use_system_scm] && !options.include?("-scmProvider system")
|
54
54
|
options << "-scmProvider system"
|
55
55
|
end
|
56
|
-
options << "-resultBundlePath '#{result_bundle_path(config[:result_bundle]
|
56
|
+
options << "-resultBundlePath '#{result_bundle_path(true)}'" if config[:result_bundle]
|
57
57
|
if FastlaneCore::Helper.xcode_at_least?(10)
|
58
|
+
options << "-parallel-testing-enabled #{config[:parallel_testing] ? 'YES' : 'NO'}" unless config[:parallel_testing].nil?
|
58
59
|
options << "-parallel-testing-worker-count #{config[:concurrent_workers]}" if config[:concurrent_workers]
|
59
60
|
options << "-maximum-concurrent-test-simulator-destinations #{config[:max_concurrent_simulators]}" if config[:max_concurrent_simulators]
|
60
61
|
options << "-disable-concurrent-testing" if config[:disable_concurrent_testing]
|
@@ -72,9 +73,13 @@ module Scan
|
|
72
73
|
end
|
73
74
|
options << "-xctestrun '#{config[:xctestrun]}'" if config[:xctestrun]
|
74
75
|
options << config[:xcargs] if config[:xcargs]
|
75
|
-
|
76
|
+
|
77
|
+
# Number of retries does not equal xcodebuild's -test-iterations number
|
78
|
+
# It needs include 1 iteration by default
|
79
|
+
number_of_retries = config[:number_of_retries] + 1
|
80
|
+
if number_of_retries > 1 && FastlaneCore::Helper.xcode_at_least?(13)
|
76
81
|
options << "-retry-tests-on-failure"
|
77
|
-
options << "-test-iterations #{
|
82
|
+
options << "-test-iterations #{number_of_retries}"
|
78
83
|
end
|
79
84
|
|
80
85
|
# detect_values will ensure that these values are present as Arrays if
|
@@ -94,7 +94,11 @@ module Snapshot
|
|
94
94
|
device_udid = TestCommandGenerator.device_udid(device_type)
|
95
95
|
|
96
96
|
UI.message("Launch Simulator #{device_type}")
|
97
|
-
Helper.
|
97
|
+
if FastlaneCore::Helper.xcode_at_least?("13")
|
98
|
+
Helper.backticks("open -a Simulator.app --args -CurrentDeviceUDID #{device_udid} &> /dev/null")
|
99
|
+
else
|
100
|
+
Helper.backticks("xcrun instruments -w #{device_udid} &> /dev/null")
|
101
|
+
end
|
98
102
|
|
99
103
|
paths.each do |path|
|
100
104
|
UI.message("Adding '#{path}'")
|
@@ -435,7 +435,8 @@ module Spaceship
|
|
435
435
|
client ||= Spaceship::ConnectAPI
|
436
436
|
filter = {
|
437
437
|
state: [
|
438
|
-
Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::WAITING_FOR_REVIEW
|
438
|
+
Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::WAITING_FOR_REVIEW,
|
439
|
+
Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::IN_REVIEW
|
439
440
|
].join(","),
|
440
441
|
platform: platform
|
441
442
|
}
|
metadata
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.204.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Jorge Revuelta H
|
8
|
-
- Jérôme Lacoste
|
9
|
-
- Andrew McBurney
|
10
|
-
- Daniel Jankowski
|
11
|
-
- Satoshi Namai
|
12
|
-
- Helmut Januschka
|
13
|
-
- Josh Holtz
|
14
|
-
- Iulian Onofrei
|
15
7
|
- Roger Oba
|
8
|
+
- Iulian Onofrei
|
9
|
+
- Kohki Miki
|
10
|
+
- Maksym Grebenets
|
11
|
+
- Luka Mirosevic
|
12
|
+
- Josh Holtz
|
13
|
+
- Max Ott
|
14
|
+
- Aaron Brager
|
15
|
+
- Danielle Tomlinson
|
16
|
+
- Olivier Halligon
|
17
|
+
- Andrew McBurney
|
18
|
+
- Jan Piotrowski
|
16
19
|
- Jimmy Dee
|
17
|
-
- Łukasz Grabowski
|
18
20
|
- Manu Wallner
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
21
|
+
- Jérôme Lacoste
|
22
|
+
- Helmut Januschka
|
23
|
+
- Łukasz Grabowski
|
24
|
+
- Stefan Natchev
|
22
25
|
- Fumiya Nakamura
|
23
|
-
- Luka Mirosevic
|
24
|
-
- Olivier Halligon
|
25
|
-
- Joshua Liebowitz
|
26
26
|
- Felix Krause
|
27
|
-
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
27
|
+
- Jorge Revuelta H
|
28
|
+
- Joshua Liebowitz
|
29
|
+
- Satoshi Namai
|
30
|
+
- Matthew Ellis
|
31
|
+
- Manish Rathi
|
32
|
+
- Daniel Jankowski
|
33
33
|
autorequire:
|
34
34
|
bindir: bin
|
35
35
|
cert_chain: []
|
36
|
-
date: 2022-
|
36
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: xcodeproj
|
@@ -1017,7 +1017,6 @@ files:
|
|
1017
1017
|
- fastlane/lib/fastlane/action.rb
|
1018
1018
|
- fastlane/lib/fastlane/action_collector.rb
|
1019
1019
|
- fastlane/lib/fastlane/actions/.DS_Store
|
1020
|
-
- fastlane/lib/fastlane/actions/.run_tests.rb.swp
|
1021
1020
|
- fastlane/lib/fastlane/actions/README.md
|
1022
1021
|
- fastlane/lib/fastlane/actions/actions_helper.rb
|
1023
1022
|
- fastlane/lib/fastlane/actions/adb.rb
|
@@ -1355,6 +1354,7 @@ files:
|
|
1355
1354
|
- fastlane/swift/Actions.swift
|
1356
1355
|
- fastlane/swift/Appfile.swift
|
1357
1356
|
- fastlane/swift/ArgumentProcessor.swift
|
1357
|
+
- fastlane/swift/Atomic.swift
|
1358
1358
|
- fastlane/swift/ControlCommand.swift
|
1359
1359
|
- fastlane/swift/Deliverfile.swift
|
1360
1360
|
- fastlane/swift/DeliverfileProtocol.swift
|
@@ -1578,8 +1578,6 @@ files:
|
|
1578
1578
|
- scan/lib/assets/ScanfileTemplate
|
1579
1579
|
- scan/lib/assets/ScanfileTemplate.swift
|
1580
1580
|
- scan/lib/scan.rb
|
1581
|
-
- scan/lib/scan/.error_handler.rb.swp
|
1582
|
-
- scan/lib/scan/.runner.rb.swp
|
1583
1581
|
- scan/lib/scan/commands_generator.rb
|
1584
1582
|
- scan/lib/scan/detect_values.rb
|
1585
1583
|
- scan/lib/scan/error_handler.rb
|
@@ -1850,7 +1848,6 @@ files:
|
|
1850
1848
|
- trainer/lib/.DS_Store
|
1851
1849
|
- trainer/lib/assets/junit.xml.erb
|
1852
1850
|
- trainer/lib/trainer.rb
|
1853
|
-
- trainer/lib/trainer/.options.rb.swp
|
1854
1851
|
- trainer/lib/trainer/commands_generator.rb
|
1855
1852
|
- trainer/lib/trainer/junit_generator.rb
|
1856
1853
|
- trainer/lib/trainer/module.rb
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|