fastlane 2.203.0 → 2.204.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +92 -92
  3. data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
  4. data/fastlane/lib/fastlane/actions/trainer.rb +2 -2
  5. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
  6. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
  7. data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
  8. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +54 -1
  9. data/fastlane/lib/fastlane/version.rb +1 -1
  10. data/fastlane/swift/Atomic.swift +150 -0
  11. data/fastlane/swift/Deliverfile.swift +1 -1
  12. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  13. data/fastlane/swift/Fastlane.swift +35 -11
  14. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
  15. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
  16. data/fastlane/swift/Gymfile.swift +1 -1
  17. data/fastlane/swift/GymfileProtocol.swift +2 -2
  18. data/fastlane/swift/LaneFileProtocol.swift +1 -1
  19. data/fastlane/swift/Matchfile.swift +1 -1
  20. data/fastlane/swift/MatchfileProtocol.swift +7 -3
  21. data/fastlane/swift/Precheckfile.swift +1 -1
  22. data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
  23. data/fastlane/swift/Runner.swift +9 -1
  24. data/fastlane/swift/Scanfile.swift +1 -1
  25. data/fastlane/swift/ScanfileProtocol.swift +2 -2
  26. data/fastlane/swift/Screengrabfile.swift +1 -1
  27. data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
  28. data/fastlane/swift/Snapshotfile.swift +1 -1
  29. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  30. data/fastlane/swift/SocketClient.swift +5 -1
  31. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  32. data/fastlane/swift/formatting/Brewfile.lock.json +19 -19
  33. data/fastlane/swift/upgrade_manifest.json +1 -1
  34. data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
  35. data/match/lib/match/nuke.rb +33 -9
  36. data/match/lib/match/options.rb +6 -1
  37. data/match/lib/match/storage/s3_storage.rb +3 -3
  38. data/pilot/lib/pilot/build_manager.rb +17 -7
  39. data/pilot/lib/pilot/options.rb +6 -1
  40. data/scan/lib/scan/runner.rb +9 -5
  41. data/snapshot/lib/assets/SnapshotHelper.swift +2 -2
  42. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +5 -1
  43. data/spaceship/lib/spaceship/portal/certificate.rb +4 -3
  44. data/trainer/lib/assets/junit.xml.erb +4 -1
  45. data/trainer/lib/trainer/.test_parser.rb.swp +0 -0
  46. data/trainer/lib/trainer/test_parser.rb +11 -2
  47. metadata +21 -22
  48. data/fastlane_core/lib/fastlane_core/.helper.rb.swp +0 -0
  49. data/scan/lib/scan/.detect_values.rb.swp +0 -0
  50. data/scan/lib/scan/.runner.rb.swp +0 -0
@@ -2,35 +2,35 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.49.3",
5
+ "version": "0.49.4",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "root_url": "https://ghcr.io/v2/homebrew/core",
9
9
  "files": {
10
10
  "arm64_monterey": {
11
11
  "cellar": ":any_skip_relocation",
12
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:3fd0427fdb74e0cc88da322ce2b2cd0b9e021fd286f34978b01b0bb62f9e8529",
13
- "sha256": "3fd0427fdb74e0cc88da322ce2b2cd0b9e021fd286f34978b01b0bb62f9e8529"
12
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:8253553ad8c6ce8550175e1152e82d80ce125fa4045a890941e1e6e915104e05",
13
+ "sha256": "8253553ad8c6ce8550175e1152e82d80ce125fa4045a890941e1e6e915104e05"
14
14
  },
15
15
  "arm64_big_sur": {
16
16
  "cellar": ":any_skip_relocation",
17
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:cc99c52385e32a1d2bb42625a535cac9835313e65ba84776cbe2ad49ae41167d",
18
- "sha256": "cc99c52385e32a1d2bb42625a535cac9835313e65ba84776cbe2ad49ae41167d"
17
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:d569c123783a70a2020f3b27de99eb7a17cfb393295e04d56c73b72212a3bf49",
18
+ "sha256": "d569c123783a70a2020f3b27de99eb7a17cfb393295e04d56c73b72212a3bf49"
19
19
  },
20
20
  "monterey": {
21
21
  "cellar": ":any_skip_relocation",
22
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:39877fc1115e6f15d20a76c30ddbb23d45f52fb95eb81382c4f4abe2b98eb03b",
23
- "sha256": "39877fc1115e6f15d20a76c30ddbb23d45f52fb95eb81382c4f4abe2b98eb03b"
22
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:4203004748fbc1eb752fc9b9b59f94627a7d5cc50ec9c0cafdbccfd3deca8558",
23
+ "sha256": "4203004748fbc1eb752fc9b9b59f94627a7d5cc50ec9c0cafdbccfd3deca8558"
24
24
  },
25
25
  "big_sur": {
26
26
  "cellar": ":any_skip_relocation",
27
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:ead4633c1ec372b7cc6995dba2d3352691b4086f501e0346629072873bccef99",
28
- "sha256": "ead4633c1ec372b7cc6995dba2d3352691b4086f501e0346629072873bccef99"
27
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:d9781aa3d22021a0dbc3f96e5d9604b1de9b269e9ce502e4a7eedf710a6aa555",
28
+ "sha256": "d9781aa3d22021a0dbc3f96e5d9604b1de9b269e9ce502e4a7eedf710a6aa555"
29
29
  },
30
30
  "catalina": {
31
31
  "cellar": ":any_skip_relocation",
32
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:359cd4f2c3eea7c28f485db06dc955d8b27eabab340420a0c52931004a3ee3e7",
33
- "sha256": "359cd4f2c3eea7c28f485db06dc955d8b27eabab340420a0c52931004a3ee3e7"
32
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:13bf74f3ee6e5afb272cc9897cc7a660a738e30137e9be7d240cfa8c18aeb8c1",
33
+ "sha256": "13bf74f3ee6e5afb272cc9897cc7a660a738e30137e9be7d240cfa8c18aeb8c1"
34
34
  }
35
35
  }
36
36
  }
@@ -48,17 +48,17 @@
48
48
  "macOS": "10.15.7"
49
49
  },
50
50
  "big_sur": {
51
- "HOMEBREW_VERSION": "3.2.17",
52
- "HOMEBREW_PREFIX": "/opt/homebrew",
53
- "Homebrew/homebrew-core": "d975bb4c6f50e8cafd6df9fc7f2ebf04d22ffa41",
54
- "CLT": "13.0.0.0.1.1630607135",
55
- "Xcode": "13.0",
56
- "macOS": "11.6"
51
+ "HOMEBREW_VERSION": "3.3.9-34-g2e92128",
52
+ "HOMEBREW_PREFIX": "/usr/local",
53
+ "Homebrew/homebrew-core": "c28163ed56d6e54f2f71ecf678d4b4d33bac23a5",
54
+ "CLT": "12.4.0.0.1.1610135815",
55
+ "Xcode": "12.5",
56
+ "macOS": "11.0.1"
57
57
  },
58
58
  "monterey": {
59
- "HOMEBREW_VERSION": "3.3.12-34-gc40b2ba",
59
+ "HOMEBREW_VERSION": "3.3.14-58-g02ceb18",
60
60
  "HOMEBREW_PREFIX": "/opt/homebrew",
61
- "Homebrew/homebrew-core": "f896f406dfd6f06ab001c6ce36e7d2087459c77a",
61
+ "Homebrew/homebrew-core": "23ce0d29228c3f5f9c70211d7f8db2e0ffc8dd4e",
62
62
  "CLT": "13.2.0.0.1.1638488800",
63
63
  "Xcode": "13.2.1",
64
64
  "macOS": "12.0.1"
@@ -1 +1 @@
1
- {"Actions.swift":"Autogenerated API","Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","Plugins.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","OptionalConfigValue.swift":"Fastfile Components","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","main.swift":"Runner Code","ArgumentProcessor.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
1
+ {"Actions.swift":"Autogenerated API","Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","Plugins.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","OptionalConfigValue.swift":"Fastfile Components","Atomic.swift":"Networking","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","main.swift":"Runner Code","ArgumentProcessor.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
@@ -320,7 +320,11 @@ module FastlaneCore
320
320
  UI.verbose("Uninstalling app '#{app_identifier}' from #{device_type}...")
321
321
 
322
322
  UI.message("Launch Simulator #{device_type}")
323
- Helper.backticks("xcrun instruments -w #{device_udid} &> /dev/null")
323
+ if FastlaneCore::Helper.xcode_at_least?("13")
324
+ Helper.backticks("open -a Simulator.app --args -CurrentDeviceUDID #{device_udid} &> /dev/null")
325
+ else
326
+ Helper.backticks("xcrun instruments -w #{device_udid} &> /dev/null")
327
+ end
324
328
 
325
329
  UI.message("Uninstall application #{app_identifier}")
326
330
  Helper.backticks("xcrun simctl uninstall #{device_udid} #{app_identifier} &> /dev/null")
@@ -18,6 +18,7 @@ module Match
18
18
  attr_accessor :params
19
19
  attr_accessor :type
20
20
 
21
+ attr_accessor :safe_remove_certs
21
22
  attr_accessor :certs
22
23
  attr_accessor :profiles
23
24
  attr_accessor :files
@@ -70,6 +71,8 @@ module Match
70
71
  hide_keys: [:app_identifier],
71
72
  title: "Summary for match nuke #{Fastlane::VERSION}")
72
73
 
74
+ self.safe_remove_certs = params[:safe_remove_certs] || false
75
+
73
76
  prepare_list
74
77
  filter_by_cert
75
78
  print_tables
@@ -81,11 +84,13 @@ module Match
81
84
  if (self.certs + self.profiles + self.files).count > 0
82
85
  unless params[:skip_confirmation]
83
86
  UI.error("---")
84
- UI.error("Are you sure you want to completely delete and revoke all the")
85
- UI.error("certificates and provisioning profiles listed above? (y/n)")
87
+ remove_or_revoke_message = self.safe_remove_certs ? "remove" : "revoke"
88
+ UI.error("Are you sure you want to completely delete and #{remove_or_revoke_message} all the")
89
+ UI.error("certificates and delete provisioning profiles listed above? (y/n)")
86
90
  UI.error("Warning: By nuking distribution, both App Store and Ad Hoc profiles will be deleted") if type == "distribution"
87
91
  UI.error("Warning: The :app_identifier value will be ignored - this will delete all profiles for all your apps!") if had_app_identifier
88
92
  UI.error("---")
93
+ print_safe_remove_certs_hint
89
94
  end
90
95
  if params[:skip_confirmation] || UI.confirm("Do you really want to nuke everything listed above?")
91
96
  nuke_it_now!
@@ -119,10 +124,12 @@ module Match
119
124
  if Spaceship::ConnectAPI.client.in_house? && (type == "distribution" || type == "enterprise")
120
125
  UI.error("---")
121
126
  UI.error("⚠️ Warning: This seems to be an Enterprise account!")
122
- UI.error("By nuking your account's distribution, all your apps deployed via ad-hoc will stop working!") if type == "distribution"
123
- UI.error("By nuking your account's enterprise, all your in-house apps will stop working!") if type == "enterprise"
127
+ unless self.safe_remove_certs
128
+ UI.error("By nuking your account's distribution, all your apps deployed via ad-hoc will stop working!") if type == "distribution"
129
+ UI.error("By nuking your account's enterprise, all your in-house apps will stop working!") if type == "enterprise"
130
+ end
124
131
  UI.error("---")
125
-
132
+ print_safe_remove_certs_hint
126
133
  UI.user_error!("Enterprise account nuke cancelled") unless UI.confirm("Do you really want to nuke your Enterprise account?")
127
134
  end
128
135
  end
@@ -168,7 +175,7 @@ module Match
168
175
  keys += self.storage.list_files(file_name: ct.to_s, file_ext: "p12")
169
176
  end
170
177
 
171
- # Finds all the iOS and macOS profofiles in the file storage
178
+ # Finds all the iOS and macOS profiles in the file storage
172
179
  profiles = []
173
180
  prov_types.each do |prov_type|
174
181
  profiles += self.storage.list_files(file_name: prov_type.to_s, file_ext: "mobileprovision")
@@ -190,7 +197,7 @@ module Match
190
197
  [i + 1, cert.name, cert.id, cert.class.to_s.split("::").last, cert_expiration]
191
198
  end
192
199
  puts(Terminal::Table.new({
193
- title: "Certificates that can be revoked".green,
200
+ title: "Certificates that can be #{removed_or_revoked_message}".green,
194
201
  headings: ["Option", "Name", "ID", "Type", "Expires"],
195
202
  rows: FastlaneCore::PrintTable.transform_output(rows)
196
203
  }))
@@ -259,7 +266,7 @@ module Match
259
266
  [cert.name, cert.id, cert.class.to_s.split("::").last, cert_expiration]
260
267
  end
261
268
  puts(Terminal::Table.new({
262
- title: "Certificates that are going to be revoked".green,
269
+ title: "Certificates that are going to be #{removed_or_revoked_message}".green,
263
270
  headings: ["Name", "ID", "Type", "Expires"],
264
271
  rows: FastlaneCore::PrintTable.transform_output(rows)
265
272
  }))
@@ -313,8 +320,14 @@ module Match
313
320
  UI.success("Successfully deleted profile")
314
321
  end
315
322
 
316
- UI.header("Revoking #{self.certs.count} certificates...") unless self.certs.count == 0
323
+ removing_or_revoking_message = self.safe_remove_certs ? "Removing" : "Revoking"
324
+ UI.header("#{removing_or_revoking_message} #{self.certs.count} certificates...") unless self.certs.count == 0
317
325
  self.certs.each do |cert|
326
+ if self.safe_remove_certs
327
+ UI.message("Certificate '#{cert.name}' (#{cert.id}) will be removed from repository without revoking it")
328
+ next
329
+ end
330
+
318
331
  UI.message("Revoking certificate '#{cert.name}' (#{cert.id})...")
319
332
  begin
320
333
  cert.delete!
@@ -427,6 +440,17 @@ module Match
427
440
  raise "Unknown provisioning type '#{prov_type}'"
428
441
  end
429
442
  end
443
+
444
+ # Helpers for `safe_remove_certs`
445
+ def print_safe_remove_certs_hint
446
+ return if self.safe_remove_certs
447
+ UI.important("Hint: You can use --safe_remove_certs option to remove certificates")
448
+ UI.important("from repository without revoking them.")
449
+ end
450
+
451
+ def removed_or_revoked_message
452
+ self.safe_remove_certs ? "removed" : "revoked"
453
+ end
430
454
  end
431
455
  # rubocop:disable Metrics/ClassLength
432
456
  end
@@ -249,7 +249,7 @@ module Match
249
249
  default_value: false),
250
250
  FastlaneCore::ConfigItem.new(key: :force_for_new_certificates,
251
251
  env_name: "MATCH_FORCE_FOR_NEW_CERTIFICATES",
252
- description: "Renew the provisioning profiles if the device count on the developer portal has changed. Works only for the 'development' provisioning profile type. Requires 'include_all_certificates' option to be 'true'",
252
+ description: "Renew the provisioning profiles if the certificate count on the developer portal has changed. Works only for the 'development' provisioning profile type. Requires 'include_all_certificates' option to be 'true'",
253
253
  type: Boolean,
254
254
  default_value: false),
255
255
  FastlaneCore::ConfigItem.new(key: :skip_confirmation,
@@ -257,6 +257,11 @@ module Match
257
257
  description: "Disables confirmation prompts during nuke, answering them with yes",
258
258
  type: Boolean,
259
259
  default_value: false),
260
+ FastlaneCore::ConfigItem.new(key: :safe_remove_certs,
261
+ env_name: "MATCH_SAFE_REMOVE_CERTS",
262
+ description: "Remove certs from repository during nuke without revoking them on the developer portal",
263
+ type: Boolean,
264
+ default_value: false),
260
265
  FastlaneCore::ConfigItem.new(key: :skip_docs,
261
266
  env_name: "MATCH_SKIP_DOCS",
262
267
  description: "Skip generation of a README.md for the created git repository",
@@ -168,10 +168,10 @@ module Match
168
168
  private
169
169
 
170
170
  def s3_object_path(file_name)
171
- santized = sanitize_file_name(file_name)
172
- return santized if santized.start_with?(s3_object_prefix)
171
+ sanitized = sanitize_file_name(file_name)
172
+ return sanitized if sanitized.start_with?(s3_object_prefix)
173
173
 
174
- s3_object_prefix + santized
174
+ s3_object_prefix + sanitized
175
175
  end
176
176
 
177
177
  def strip_s3_object_prefix(object_path)
@@ -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
- if options[:ipa]
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: options[:ipa],
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: options[:pkg],
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: options[:ipa] || options[:pkg])
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
- UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
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
@@ -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
@@ -188,6 +188,7 @@ module Scan
188
188
  number_of_tests: 0,
189
189
  number_of_failures: 0,
190
190
  number_of_retries: 0,
191
+ number_of_skipped: 0,
191
192
  number_of_tests_excluding_retries: 0,
192
193
  number_of_failures_excluding_retries: 0
193
194
  }
@@ -250,6 +251,7 @@ module Scan
250
251
  results[:number_of_failures] += data[:number_of_failures]
251
252
  results[:number_of_tests_excluding_retries] += data[:number_of_tests_excluding_retries]
252
253
  results[:number_of_failures_excluding_retries] += data[:number_of_failures_excluding_retries]
254
+ results[:number_of_skipped] += data[:number_of_skipped] || 0
253
255
  results[:number_of_retries] += data[:number_of_retries]
254
256
  end
255
257
 
@@ -257,11 +259,16 @@ module Scan
257
259
  end
258
260
 
259
261
  def handle_results(tests_exit_status)
262
+ copy_simulator_logs
263
+ zip_build_products
264
+ copy_xctestrun
265
+
260
266
  return nil if Scan.config[:build_for_testing]
261
267
 
262
268
  results = trainer_test_results
263
269
 
264
270
  number_of_retries = results[:number_of_retries]
271
+ number_of_skipped = results[:number_of_skipped]
265
272
  number_of_tests = results[:number_of_tests_excluding_retries]
266
273
  number_of_failures = results[:number_of_failures_excluding_retries]
267
274
 
@@ -289,15 +296,12 @@ module Scan
289
296
  title: "Test Results",
290
297
  rows: [
291
298
  ["Number of tests", "#{number_of_tests}#{retries_str}"],
299
+ number_of_skipped > 0 ? ["Number of tests skipped", number_of_skipped] : nil,
292
300
  ["Number of failures", failures_str]
293
- ]
301
+ ].compact
294
302
  }))
295
303
  puts("")
296
304
 
297
- copy_simulator_logs
298
- zip_build_products
299
- copy_xctestrun
300
-
301
305
  if number_of_failures > 0
302
306
  open_report
303
307
 
@@ -165,7 +165,7 @@ open class Snapshot: NSObject {
165
165
  }
166
166
 
167
167
  let screenshot = XCUIScreen.main.screenshot()
168
- #if os(iOS)
168
+ #if os(iOS) && !targetEnvironment(macCatalyst)
169
169
  let image = XCUIDevice.shared.orientation.isLandscape ? fixLandscapeOrientation(image: screenshot.image) : screenshot.image
170
170
  #else
171
171
  let image = screenshot.image
@@ -306,4 +306,4 @@ private extension CGFloat {
306
306
 
307
307
  // Please don't remove the lines below
308
308
  // They are used to detect outdated configuration files
309
- // SnapshotHelperVersion [1.27]
309
+ // SnapshotHelperVersion [1.28]
@@ -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.backticks("xcrun instruments -w #{device_udid} &> /dev/null")
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}'")
@@ -168,7 +168,7 @@ module Spaceship
168
168
  "R58UK2EWSO" => Production,
169
169
  "9RQEK7MSXA" => InHouse,
170
170
  "LA30L5BJEU" => Certificate,
171
- "BKLRAVXMGM" => DevelopmentPush,
171
+ "JKG5JZ54H7" => DevelopmentPush,
172
172
  "UPV3DW712I" => ProductionPush,
173
173
  "Y3B2F3TYSI" => Passbook,
174
174
  "3T2ZP62QW8" => WebsitePush,
@@ -178,12 +178,13 @@ module Spaceship
178
178
  }
179
179
 
180
180
  OLDER_IOS_CERTIFICATE_TYPES = [
181
- # those are also sent by the browser, but not sure what they represent
181
+ "3BQKVH9I2X", # old ProductionPush
182
+ "BKLRAVXMGM", # old DevelopmentPush
183
+ # those are also sent by the browser, but not sure what they represent:
182
184
  "T44PTHVNID",
183
185
  "DZQUP8189Y",
184
186
  "FGQUP4785Z",
185
187
  "S5WE21TULA",
186
- "3BQKVH9I2X", # ProductionPush,
187
188
  "FUOY7LWJET"
188
189
  ]
189
190
 
@@ -6,13 +6,16 @@
6
6
 
7
7
  <testsuites tests="<%= number_of_tests %>" failures="<%= number_of_failures %>">
8
8
  <% @results.each do |testsuite| %>
9
- <testsuite name=<%= (testsuite[:target_name].nil? ? testsuite[:test_name] : testsuite[:target_name]).encode(:xml => :attr) %> tests="<%= testsuite[:number_of_tests_excluding_retries] %>" failures="<%= testsuite[:number_of_failures_excluding_retries] %>" time="<%= testsuite[:duration] %>">
9
+ <testsuite name=<%= (testsuite[:target_name].nil? ? testsuite[:test_name] : testsuite[:target_name]).encode(:xml => :attr) %> tests="<%= testsuite[:number_of_tests_excluding_retries] %>" failures="<%= testsuite[:number_of_failures_excluding_retries] %>" <% if testsuite[:number_of_skipped] %>skipped="<%= testsuite[:number_of_skipped] %>" <% end %>time="<%= testsuite[:duration] %>">
10
10
  <% testsuite[:tests].each do |test| %>
11
11
  <testcase classname=<%= test[:test_group].encode(:xml => :attr) %> name=<%= test[:name].encode(:xml => :attr) %> time="<%= test[:duration] %>">
12
12
  <% (test[:failures] || []).each do |failure| %>
13
13
  <failure message=<%= failure[:failure_message].encode(:xml => :attr) %>>
14
14
  </failure>
15
15
  <% end %>
16
+ <% if test[:skipped] %>
17
+ <skipped/>
18
+ <% end%>
16
19
  </testcase>
17
20
  <% end %>
18
21
  </testsuite>
@@ -19,6 +19,7 @@ module Trainer
19
19
  attr_accessor :number_of_tests_excluding_retries
20
20
  attr_accessor :number_of_failures_excluding_retries
21
21
  attr_accessor :number_of_retries
22
+ attr_accessor :number_of_skipped
22
23
 
23
24
  # Returns a hash with the path being the key, and the value
24
25
  # defining if the tests were successful
@@ -89,7 +90,8 @@ module Trainer
89
90
  number_of_failures: tp.number_of_failures,
90
91
  number_of_tests_excluding_retries: tp.number_of_tests_excluding_retries,
91
92
  number_of_failures_excluding_retries: tp.number_of_failures_excluding_retries,
92
- number_of_retries: tp.number_of_retries
93
+ number_of_retries: tp.number_of_retries,
94
+ number_of_skipped: tp.number_of_skipped
93
95
  }
94
96
  end
95
97
  return_hash
@@ -116,12 +118,14 @@ module Trainer
116
118
  self.number_of_tests_excluding_retries = 0
117
119
  self.number_of_failures_excluding_retries = 0
118
120
  self.number_of_retries = 0
121
+ self.number_of_skipped = 0
119
122
  self.data.each do |thing|
120
123
  self.number_of_tests += thing[:number_of_tests].to_i
121
124
  self.number_of_failures += thing[:number_of_failures].to_i
122
125
  self.number_of_tests_excluding_retries += thing[:number_of_tests_excluding_retries].to_i
123
126
  self.number_of_failures_excluding_retries += thing[:number_of_failures_excluding_retries].to_i
124
127
  self.number_of_retries += thing[:number_of_retries].to_i
128
+ self.number_of_skipped += thing[:number_of_skipped].to_i
125
129
  end
126
130
  end
127
131
 
@@ -250,6 +254,7 @@ module Trainer
250
254
 
251
255
  info = tests_by_identifier[identifier] || {}
252
256
  info[:failure_count] ||= 0
257
+ info[:skip_count] ||= 0
253
258
  info[:success_count] ||= 0
254
259
 
255
260
  retry_count = info[:retry_count]
@@ -272,6 +277,9 @@ module Trainer
272
277
  }]
273
278
 
274
279
  info[:failure_count] += 1
280
+ elsif test.test_status == "Skipped"
281
+ test_row[:skipped] = true
282
+ info[:skip_count] += 1
275
283
  else
276
284
  info[:success_count] = 1
277
285
  end
@@ -319,7 +327,8 @@ module Trainer
319
327
  # Used for seeing if any tests continued to fail after all of the Xcode 13 (and up) retries have finished
320
328
  unique_tests = tests_by_identifier.values || []
321
329
  row[:number_of_tests_excluding_retries] = unique_tests.count
322
- row[:number_of_failures_excluding_retries] = unique_tests.find_all { |a| a[:success_count] == 0 }.count
330
+ row[:number_of_skipped] = unique_tests.map { |a| a[:skip_count] }.inject(:+)
331
+ row[:number_of_failures_excluding_retries] = unique_tests.find_all { |a| (a[:success_count] + a[:skip_count]) == 0 }.count
323
332
  row[:number_of_retries] = unique_tests.map { |a| a[:retry_count] }.inject(:+)
324
333
 
325
334
  row
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.203.0
4
+ version: 2.204.3
5
5
  platform: ruby
6
6
  authors:
7
- - Jimmy Dee
7
+ - Jorge Revuelta H
8
+ - Roger Oba
9
+ - Danielle Tomlinson
10
+ - Helmut Januschka
11
+ - Jérôme Lacoste
12
+ - Josh Holtz
13
+ - Joshua Liebowitz
8
14
  - Felix Krause
9
- - Maksym Grebenets
15
+ - Aaron Brager
16
+ - Łukasz Grabowski
10
17
  - Fumiya Nakamura
11
- - Matthew Ellis
12
- - Jérôme Lacoste
13
18
  - Iulian Onofrei
19
+ - Jimmy Dee
20
+ - Manish Rathi
14
21
  - Kohki Miki
15
- - Olivier Halligon
16
- - Roger Oba
17
- - Helmut Januschka
18
- - Łukasz Grabowski
19
- - Andrew McBurney
20
- - Manu Wallner
22
+ - Daniel Jankowski
23
+ - Maksym Grebenets
21
24
  - Stefan Natchev
22
- - Joshua Liebowitz
23
- - Manish Rathi
24
25
  - Satoshi Namai
25
- - Josh Holtz
26
- - Jorge Revuelta H
27
26
  - Max Ott
28
- - Aaron Brager
29
- - Daniel Jankowski
30
- - Danielle Tomlinson
27
+ - Matthew Ellis
31
28
  - Luka Mirosevic
32
29
  - Jan Piotrowski
30
+ - Olivier Halligon
31
+ - Manu Wallner
32
+ - Andrew McBurney
33
33
  autorequire:
34
34
  bindir: bin
35
35
  cert_chain: []
36
- date: 2022-01-28 00:00:00.000000000 Z
36
+ date: 2022-02-11 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: xcodeproj
@@ -1354,6 +1354,7 @@ files:
1354
1354
  - fastlane/swift/Actions.swift
1355
1355
  - fastlane/swift/Appfile.swift
1356
1356
  - fastlane/swift/ArgumentProcessor.swift
1357
+ - fastlane/swift/Atomic.swift
1357
1358
  - fastlane/swift/ControlCommand.swift
1358
1359
  - fastlane/swift/Deliverfile.swift
1359
1360
  - fastlane/swift/DeliverfileProtocol.swift
@@ -1395,7 +1396,6 @@ files:
1395
1396
  - fastlane_core/README.md
1396
1397
  - fastlane_core/lib/assets/XMLTemplate.xml.erb
1397
1398
  - fastlane_core/lib/fastlane_core.rb
1398
- - fastlane_core/lib/fastlane_core/.helper.rb.swp
1399
1399
  - fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb
1400
1400
  - fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
1401
1401
  - fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb
@@ -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/.detect_values.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,6 +1848,7 @@ files:
1850
1848
  - trainer/lib/.DS_Store
1851
1849
  - trainer/lib/assets/junit.xml.erb
1852
1850
  - trainer/lib/trainer.rb
1851
+ - trainer/lib/trainer/.test_parser.rb.swp
1853
1852
  - trainer/lib/trainer/commands_generator.rb
1854
1853
  - trainer/lib/trainer/junit_generator.rb
1855
1854
  - trainer/lib/trainer/module.rb
Binary file
Binary file