fastlane 2.196.0 → 2.212.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +88 -81
  4. data/cert/lib/cert/runner.rb +19 -8
  5. data/deliver/lib/assets/ScreenshotsHelp +29 -6
  6. data/deliver/lib/deliver/app_screenshot.rb +30 -4
  7. data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
  8. data/deliver/lib/deliver/options.rb +6 -2
  9. data/deliver/lib/deliver/runner.rb +88 -24
  10. data/deliver/lib/deliver/submit_for_review.rb +25 -3
  11. data/deliver/lib/deliver/upload_price_tier.rb +3 -1
  12. data/deliver/lib/deliver/upload_screenshots.rb +2 -2
  13. data/fastlane/lib/assets/AppfileTemplate +1 -1
  14. data/fastlane/lib/assets/AppfileTemplate.swift +1 -1
  15. data/fastlane/lib/fastlane/actions/badge.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/danger.rb +14 -0
  18. data/fastlane/lib/fastlane/actions/docs/build_app.md +5 -5
  19. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +19 -2
  20. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/run_tests.md +1 -1
  22. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
  23. data/fastlane/lib/fastlane/actions/download_dsyms.rb +62 -46
  24. data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +15 -4
  25. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
  27. data/fastlane/lib/fastlane/actions/get_version_number.rb +8 -3
  28. data/fastlane/lib/fastlane/actions/git_commit.rb +4 -6
  29. data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
  30. data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
  31. data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +1 -1
  32. data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
  33. data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
  34. data/fastlane/lib/fastlane/actions/run_tests.rb +19 -9
  35. data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
  36. data/fastlane/lib/fastlane/actions/setup_ci.rb +13 -4
  37. data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
  38. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +31 -4
  39. data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
  40. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +10 -1
  41. data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
  42. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
  43. data/fastlane/lib/fastlane/actions/xcode_install.rb +5 -1
  44. data/fastlane/lib/fastlane/actions/xcode_select.rb +1 -1
  45. data/fastlane/lib/fastlane/actions/xcodebuild.rb +8 -2
  46. data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
  47. data/fastlane/lib/fastlane/actions/xcov.rb +5 -0
  48. data/fastlane/lib/fastlane/actions/xcversion.rb +17 -7
  49. data/fastlane/lib/fastlane/cli_tools_distributor.rb +5 -0
  50. data/fastlane/lib/fastlane/commands_generator.rb +2 -1
  51. data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
  52. data/fastlane/lib/fastlane/fast_file.rb +18 -5
  53. data/fastlane/lib/fastlane/features.rb +3 -0
  54. data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
  55. data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
  56. data/fastlane/lib/fastlane/helper/xcversion_helper.rb +0 -9
  57. data/fastlane/lib/fastlane/lane_manager.rb +1 -1
  58. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
  59. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
  60. data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
  61. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
  62. data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
  63. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +54 -1
  64. data/fastlane/lib/fastlane/tools.rb +18 -1
  65. data/fastlane/lib/fastlane/version.rb +1 -1
  66. data/fastlane/swift/Actions.swift +1 -1
  67. data/fastlane/swift/Appfile.swift +2 -2
  68. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  69. data/fastlane/swift/Atomic.swift +150 -0
  70. data/fastlane/swift/ControlCommand.swift +1 -1
  71. data/fastlane/swift/Deliverfile.swift +2 -2
  72. data/fastlane/swift/DeliverfileProtocol.swift +8 -4
  73. data/fastlane/swift/Fastlane.swift +570 -239
  74. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
  75. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
  76. data/fastlane/swift/Gymfile.swift +2 -2
  77. data/fastlane/swift/GymfileProtocol.swift +20 -8
  78. data/fastlane/swift/LaneFileProtocol.swift +2 -2
  79. data/fastlane/swift/MainProcess.swift +3 -3
  80. data/fastlane/swift/Matchfile.swift +2 -2
  81. data/fastlane/swift/MatchfileProtocol.swift +21 -5
  82. data/fastlane/swift/OptionalConfigValue.swift +1 -1
  83. data/fastlane/swift/Plugins.swift +1 -1
  84. data/fastlane/swift/Precheckfile.swift +2 -2
  85. data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
  86. data/fastlane/swift/RubyCommand.swift +1 -1
  87. data/fastlane/swift/RubyCommandable.swift +1 -1
  88. data/fastlane/swift/Runner.swift +13 -9
  89. data/fastlane/swift/RunnerArgument.swift +1 -1
  90. data/fastlane/swift/Scanfile.swift +2 -2
  91. data/fastlane/swift/ScanfileProtocol.swift +31 -11
  92. data/fastlane/swift/Screengrabfile.swift +2 -2
  93. data/fastlane/swift/ScreengrabfileProtocol.swift +3 -3
  94. data/fastlane/swift/Snapshotfile.swift +2 -2
  95. data/fastlane/swift/SnapshotfileProtocol.swift +12 -8
  96. data/fastlane/swift/SocketClient.swift +9 -5
  97. data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -2
  98. data/fastlane/swift/SocketResponse.swift +1 -1
  99. data/fastlane/swift/formatting/Brewfile.lock.json +46 -23
  100. data/fastlane/swift/main.swift +1 -1
  101. data/fastlane/swift/upgrade_manifest.json +1 -1
  102. data/fastlane_core/README.md +1 -0
  103. data/fastlane_core/lib/fastlane_core/cert_checker.rb +79 -17
  104. data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
  105. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +10 -5
  106. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +409 -26
  107. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
  108. data/fastlane_core/lib/fastlane_core/project.rb +19 -2
  109. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
  110. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -2
  111. data/frameit/lib/frameit/device.rb +1 -1
  112. data/frameit/lib/frameit/device_types.rb +9 -0
  113. data/frameit/lib/frameit/editor.rb +16 -18
  114. data/frameit/lib/frameit/frame_downloader.rb +1 -1
  115. data/frameit/lib/frameit/trim_box.rb +6 -0
  116. data/gym/lib/gym/generators/build_command_generator.rb +70 -23
  117. data/gym/lib/gym/options.rb +30 -5
  118. data/match/lib/match/change_password.rb +2 -0
  119. data/match/lib/match/commands_generator.rb +2 -1
  120. data/match/lib/match/encryption/openssl.rb +1 -1
  121. data/match/lib/match/encryption.rb +3 -0
  122. data/match/lib/match/generator.rb +1 -0
  123. data/match/lib/match/importer.rb +10 -1
  124. data/match/lib/match/migrate.rb +4 -3
  125. data/match/lib/match/module.rb +54 -2
  126. data/match/lib/match/nuke.rb +114 -47
  127. data/match/lib/match/options.rb +22 -1
  128. data/match/lib/match/runner.rb +25 -6
  129. data/match/lib/match/setup.rb +1 -1
  130. data/match/lib/match/spaceship_ensure.rb +5 -2
  131. data/match/lib/match/storage/gitlab/client.rb +102 -0
  132. data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
  133. data/match/lib/match/storage/gitlab_secure_files.rb +182 -0
  134. data/match/lib/match/storage/google_cloud_storage.rb +7 -6
  135. data/match/lib/match/storage/s3_storage.rb +3 -3
  136. data/match/lib/match/storage.rb +4 -0
  137. data/match/lib/match/table_printer.rb +2 -1
  138. data/match/lib/match/utils.rb +15 -2
  139. data/pem/lib/pem/manager.rb +30 -7
  140. data/pem/lib/pem/options.rb +9 -0
  141. data/pilot/lib/pilot/build_manager.rb +34 -14
  142. data/pilot/lib/pilot/options.rb +6 -1
  143. data/scan/lib/scan/detect_values.rb +6 -0
  144. data/scan/lib/scan/error_handler.rb +9 -0
  145. data/scan/lib/scan/options.rb +49 -9
  146. data/scan/lib/scan/runner.rb +171 -25
  147. data/scan/lib/scan/test_command_generator.rb +65 -5
  148. data/sigh/lib/sigh/download_all.rb +14 -2
  149. data/sigh/lib/sigh/module.rb +3 -1
  150. data/sigh/lib/sigh/options.rb +5 -0
  151. data/sigh/lib/sigh/runner.rb +12 -2
  152. data/snapshot/lib/assets/SnapshotHelper.swift +3 -3
  153. data/snapshot/lib/snapshot/latest_os_version.rb +2 -5
  154. data/snapshot/lib/snapshot/options.rb +24 -8
  155. data/snapshot/lib/snapshot/reports_generator.rb +1 -0
  156. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -3
  157. data/snapshot/lib/snapshot/test_command_generator.rb +37 -2
  158. data/spaceship/lib/spaceship/client.rb +71 -40
  159. data/spaceship/lib/spaceship/commands_generator.rb +1 -1
  160. data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
  161. data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
  162. data/spaceship/lib/spaceship/connect_api/models/app.rb +52 -6
  163. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
  164. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +5 -0
  165. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -0
  166. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
  167. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -10
  168. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -2
  169. data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
  170. data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
  171. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +2 -1
  172. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +4 -0
  173. data/spaceship/lib/spaceship/connect_api/models/device.rb +47 -4
  174. data/spaceship/lib/spaceship/connect_api/models/profile.rb +4 -0
  175. data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
  176. data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
  177. data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
  178. data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
  179. data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
  180. data/spaceship/lib/spaceship/connect_api/models/user.rb +5 -0
  181. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +19 -0
  182. data/spaceship/lib/spaceship/connect_api/response.rb +23 -6
  183. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +33 -2
  184. data/spaceship/lib/spaceship/connect_api/token.rb +5 -2
  185. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +124 -8
  186. data/spaceship/lib/spaceship/connect_api.rb +9 -0
  187. data/spaceship/lib/spaceship/errors.rb +34 -0
  188. data/spaceship/lib/spaceship/globals.rb +9 -0
  189. data/spaceship/lib/spaceship/hashcash.rb +52 -0
  190. data/spaceship/lib/spaceship/portal/certificate.rb +4 -3
  191. data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
  192. data/spaceship/lib/spaceship/tunes/app_ratings.rb +6 -6
  193. data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
  194. data/spaceship/lib/spaceship/tunes/tunes.rb +0 -1
  195. data/spaceship/lib/spaceship/tunes/tunes_client.rb +79 -21
  196. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -3
  197. data/spaceship/lib/spaceship.rb +1 -0
  198. data/supply/lib/supply/client.rb +2 -7
  199. data/supply/lib/supply/options.rb +8 -0
  200. data/supply/lib/supply/uploader.rb +6 -2
  201. data/trainer/lib/assets/junit.xml.erb +28 -0
  202. data/trainer/lib/trainer/commands_generator.rb +51 -0
  203. data/trainer/lib/trainer/junit_generator.rb +31 -0
  204. data/trainer/lib/trainer/module.rb +10 -0
  205. data/trainer/lib/trainer/options.rb +66 -0
  206. data/trainer/lib/trainer/test_parser.rb +398 -0
  207. data/trainer/lib/trainer/xcresult.rb +403 -0
  208. data/trainer/lib/trainer.rb +7 -0
  209. metadata +49 -24
  210. data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
  211. data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -15
@@ -1,7 +1,7 @@
1
1
  // ScreengrabfileProtocol.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
- public protocol ScreengrabfileProtocol: class {
4
+ public protocol ScreengrabfileProtocol: AnyObject {
5
5
  /// Path to the root of your Android SDK installation, e.g. ~/tools/android-sdk-macosx
6
6
  var androidHome: String? { get }
7
7
 
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.83]
99
+ // FastlaneRunnerAPIVersion [0.9.113]
@@ -1,5 +1,5 @@
1
1
  // Snapshotfile.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
4
  // This class is automatically included in FastlaneRunner during build
5
5
 
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.196.0
20
+ // Generated with fastlane 2.212.2
@@ -1,7 +1,7 @@
1
1
  // SnapshotfileProtocol.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
- public protocol SnapshotfileProtocol: class {
4
+ public protocol SnapshotfileProtocol: AnyObject {
5
5
  /// Path the workspace file
6
6
  var workspace: String? { get }
7
7
 
@@ -53,7 +53,7 @@ public protocol SnapshotfileProtocol: class {
53
53
  /// Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception (Adjust 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT' environment variable if override status bar is not working. Might be because simulator is not fully booted. Defaults to 10 seconds)
54
54
  var overrideStatusBar: Bool { get }
55
55
 
56
- /// Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`
56
+ /// Fully customize the status bar by setting each option here. Requires `override_status_bar` to be set to `true`. See `xcrun simctl status_bar --help`
57
57
  var overrideStatusBarArguments: String? { get }
58
58
 
59
59
  /// Enabling this option will configure the Simulator's system language
@@ -86,9 +86,6 @@ public protocol SnapshotfileProtocol: class {
86
86
  /// The configuration to use when building the app. Defaults to 'Release'
87
87
  var configuration: String? { get }
88
88
 
89
- /// Additional xcpretty arguments
90
- var xcprettyArgs: String? { get }
91
-
92
89
  /// The SDK that should be used for building the application
93
90
  var sdk: String? { get }
94
91
 
@@ -137,6 +134,12 @@ public protocol SnapshotfileProtocol: class {
137
134
  /// Array of strings matching Test Bundle/Test Suite/Test Cases to skip
138
135
  var skipTesting: String? { get }
139
136
 
137
+ /// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
138
+ var xcodebuildFormatter: String { get }
139
+
140
+ /// **DEPRECATED!** Use `xcodebuild_formatter: ''` instead - Additional xcpretty arguments
141
+ var xcprettyArgs: String? { get }
142
+
140
143
  /// Disable xcpretty formatting of build
141
144
  var disableXcpretty: Bool? { get }
142
145
 
@@ -176,7 +179,6 @@ public extension SnapshotfileProtocol {
176
179
  var clean: Bool { return false }
177
180
  var testWithoutBuilding: Bool? { return nil }
178
181
  var configuration: String? { return nil }
179
- var xcprettyArgs: String? { return nil }
180
182
  var sdk: String? { return nil }
181
183
  var scheme: String? { return nil }
182
184
  var numberOfRetries: Int { return 1 }
@@ -193,6 +195,8 @@ public extension SnapshotfileProtocol {
193
195
  var testplan: String? { return nil }
194
196
  var onlyTesting: String? { return nil }
195
197
  var skipTesting: String? { return nil }
198
+ var xcodebuildFormatter: String { return "xcbeautify" }
199
+ var xcprettyArgs: String? { return nil }
196
200
  var disableXcpretty: Bool? { return nil }
197
201
  var suppressXcodeOutput: Bool? { return nil }
198
202
  var useSystemScm: Bool { return false }
@@ -200,4 +204,4 @@ public extension SnapshotfileProtocol {
200
204
 
201
205
  // Please don't remove the lines below
202
206
  // They are used to detect outdated files
203
- // FastlaneRunnerAPIVersion [0.9.77]
207
+ // FastlaneRunnerAPIVersion [0.9.107]
@@ -1,5 +1,5 @@
1
1
  // SocketClient.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
4
  //
5
5
  // ** NOTE **
@@ -144,7 +144,11 @@ class SocketClient: NSObject {
144
144
 
145
145
  private func sendThroughQueue(string: String) {
146
146
  let data = string.data(using: .utf8)!
147
- _ = data.withUnsafeBytes { self.outputStream.write($0, maxLength: data.count) }
147
+ data.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in
148
+ if let buffer = buffer.baseAddress {
149
+ self.outputStream.write(buffer.assumingMemoryBound(to: UInt8.self), maxLength: data.count)
150
+ }
151
+ }
148
152
  }
149
153
 
150
154
  private func privateSend(string: String) {
@@ -202,7 +206,7 @@ class SocketClient: NSObject {
202
206
  extension SocketClient: StreamDelegate {
203
207
  func stream(_ aStream: Stream, handle eventCode: Stream.Event) {
204
208
  guard !cleaningUpAfterDone else {
205
- // Still getting response from server eventhough we are done.
209
+ // Still getting response from server even though we are done.
206
210
  // No big deal, we're closing the streams anyway.
207
211
  // That being said, we need to balance out the dispatchGroups
208
212
  dispatchGroup.leave()
@@ -240,7 +244,7 @@ extension SocketClient: StreamDelegate {
240
244
 
241
245
  case Stream.Event.errorOccurred:
242
246
  // probably safe to close all the things because Ruby already disconnected
243
- verbose(message: "output stream recevied error")
247
+ verbose(message: "output stream received error")
244
248
 
245
249
  case Stream.Event.endEncountered:
246
250
  // nothing special here
@@ -306,7 +310,7 @@ extension SocketClient: StreamDelegate {
306
310
  LaneFile.fastfileInstance?.onError(currentLane: ArgumentProcessor(args: CommandLine.arguments).currentLane, errorInfo: failureInformation.joined(), errorClass: failureClass, errorMessage: failureMessage)
307
311
  socketDelegate?.commandExecuted(serverResponse: .serverError) {
308
312
  $0.writeSemaphore.signal()
309
- self.handleFailure(message: failureInformation)
313
+ self.handleFailure(message: failureMessage.map { m in [m] + failureInformation } ?? failureInformation)
310
314
  }
311
315
 
312
316
  case let .parseFailure(failureInformation):
@@ -1,5 +1,5 @@
1
1
  // SocketClientDelegateProtocol.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
4
  //
5
5
  // ** NOTE **
@@ -10,7 +10,7 @@
10
10
 
11
11
  import Foundation
12
12
 
13
- protocol SocketClientDelegateProtocol: class {
13
+ protocol SocketClientDelegateProtocol: AnyObject {
14
14
  func connectionsOpened()
15
15
  func connectionsClosed()
16
16
  func commandExecuted(serverResponse: SocketClientResponse, completion: (SocketClient) -> Void)
@@ -1,5 +1,5 @@
1
1
  // SocketResponse.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
4
  //
5
5
  // ** NOTE **
@@ -2,30 +2,45 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.48.16",
5
+ "version": "0.51.6",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "root_url": "https://ghcr.io/v2/homebrew/core",
9
9
  "files": {
10
+ "arm64_ventura": {
11
+ "cellar": ":any_skip_relocation",
12
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:71a684a6ccb9892d1382a6682a67db9b6c4e0db50f3e401aeaa4bd9bd2c17870",
13
+ "sha256": "71a684a6ccb9892d1382a6682a67db9b6c4e0db50f3e401aeaa4bd9bd2c17870"
14
+ },
15
+ "arm64_monterey": {
16
+ "cellar": ":any_skip_relocation",
17
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c7308dba4ff65f6c4b1516ec8ac3c207d38e8b88fedcb29baccdf606748b9b04",
18
+ "sha256": "c7308dba4ff65f6c4b1516ec8ac3c207d38e8b88fedcb29baccdf606748b9b04"
19
+ },
10
20
  "arm64_big_sur": {
11
21
  "cellar": ":any_skip_relocation",
12
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:6e754174bb20c391ccebe2685d1ab2dcba66020f0bb0eb118c09272d9daebbbd",
13
- "sha256": "6e754174bb20c391ccebe2685d1ab2dcba66020f0bb0eb118c09272d9daebbbd"
22
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b80beeea8dfcce222aa998aae8431455644c607dca36ce9deaa23ba862239dfd",
23
+ "sha256": "b80beeea8dfcce222aa998aae8431455644c607dca36ce9deaa23ba862239dfd"
14
24
  },
15
- "big_sur": {
25
+ "ventura": {
16
26
  "cellar": ":any_skip_relocation",
17
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:a6d4e1a74a8904358df45ea9cc694dbf9b228e6fcf1bcf88bb9f5e18681411ac",
18
- "sha256": "a6d4e1a74a8904358df45ea9cc694dbf9b228e6fcf1bcf88bb9f5e18681411ac"
27
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:922f21c82c873425d7bd6064fc7b01c29a6fb9cc327ec0ac2aff6d65944f007c",
28
+ "sha256": "922f21c82c873425d7bd6064fc7b01c29a6fb9cc327ec0ac2aff6d65944f007c"
19
29
  },
20
- "catalina": {
30
+ "monterey": {
21
31
  "cellar": ":any_skip_relocation",
22
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c88cdbc2ade1ad4635fdafcb9b3ad23b6ba12aa50f5507bd2615dca2f9d21530",
23
- "sha256": "c88cdbc2ade1ad4635fdafcb9b3ad23b6ba12aa50f5507bd2615dca2f9d21530"
32
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b0fa51fd3bff14854aea1c7be41dbecf4b11b229e8133eda6a61cc5b8364c1f3",
33
+ "sha256": "b0fa51fd3bff14854aea1c7be41dbecf4b11b229e8133eda6a61cc5b8364c1f3"
24
34
  },
25
- "mojave": {
35
+ "big_sur": {
26
36
  "cellar": ":any_skip_relocation",
27
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:0a4d4a8b561e961e8cd98c216fb4589cbbcf127c26fc25c81f794360295950ec",
28
- "sha256": "0a4d4a8b561e961e8cd98c216fb4589cbbcf127c26fc25c81f794360295950ec"
37
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:a27afde79eed546acaf429a8489f9195d6633e21259d9269bab919d32e9b4223",
38
+ "sha256": "a27afde79eed546acaf429a8489f9195d6633e21259d9269bab919d32e9b4223"
39
+ },
40
+ "x86_64_linux": {
41
+ "cellar": "/home/linuxbrew/.linuxbrew/Cellar",
42
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:306d7ebf95846c3bccc426ee62915b73566ff3ea7e0fc859624c11b0dec817f2",
43
+ "sha256": "306d7ebf95846c3bccc426ee62915b73566ff3ea7e0fc859624c11b0dec817f2"
29
44
  }
30
45
  }
31
46
  }
@@ -43,20 +58,28 @@
43
58
  "macOS": "10.15.7"
44
59
  },
45
60
  "big_sur": {
46
- "HOMEBREW_VERSION": "3.2.16",
61
+ "HOMEBREW_VERSION": "3.3.9-34-g2e92128",
47
62
  "HOMEBREW_PREFIX": "/usr/local",
48
- "Homebrew/homebrew-core": "f01e43d7cecd622bb39ab48504bb01e350ab36db",
49
- "CLT": "13.0.0.0.1.1630607135",
50
- "Xcode": "13.0",
51
- "macOS": "11.6"
63
+ "Homebrew/homebrew-core": "c28163ed56d6e54f2f71ecf678d4b4d33bac23a5",
64
+ "CLT": "12.4.0.0.1.1610135815",
65
+ "Xcode": "12.5",
66
+ "macOS": "11.0.1"
52
67
  },
53
68
  "monterey": {
54
- "HOMEBREW_VERSION": "3.2.13-55-ga6959e4",
55
- "HOMEBREW_PREFIX": "/usr/local",
56
- "Homebrew/homebrew-core": "3fb109275770551bba03c7055d75ceec2c38b1b2",
57
- "CLT": "13.0.0.0.1.1628499445",
58
- "Xcode": "13.0",
59
- "macOS": "12.0"
69
+ "HOMEBREW_VERSION": "3.6.10-11-gb683beb",
70
+ "HOMEBREW_PREFIX": "/opt/homebrew",
71
+ "Homebrew/homebrew-core": "0bc04af3657134103a6f2b48b31e278e2537e85f",
72
+ "CLT": "13.4.0.0.1.1651278267",
73
+ "Xcode": "13.4.1",
74
+ "macOS": "12.5"
75
+ },
76
+ "ventura": {
77
+ "HOMEBREW_VERSION": "4.0.13-42-gac0663a",
78
+ "HOMEBREW_PREFIX": "/opt/homebrew",
79
+ "Homebrew/homebrew-core": "api",
80
+ "CLT": "",
81
+ "Xcode": "14.1",
82
+ "macOS": "13.2.1"
60
83
  }
61
84
  }
62
85
  }
@@ -1,5 +1,5 @@
1
1
  // main.swift
2
- // Copyright (c) 2021 FastlaneTools
2
+ // Copyright (c) 2023 FastlaneTools
3
3
 
4
4
  //
5
5
  // ** NOTE **
@@ -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"}
@@ -23,6 +23,7 @@ You can hide the inline changelog by setting the `FASTLANE_HIDE_CHANGELOG` envir
23
23
 
24
24
  - To hide timestamps in each row, set the `FASTLANE_HIDE_TIMESTAMP` environment variable to true.
25
25
  - To disable output formatting, set the `FASTLANE_DISABLE_OUTPUT_FORMAT` environment variable to true.
26
+ - To prevent _fastlane_ from printing the plugins table on every lane run, set the `FASTLANE_HIDE_PLUGINS_TABLE` environment variable to true.
26
27
 
27
28
  ## Interacting with the user
28
29
 
@@ -1,8 +1,43 @@
1
1
  require 'tempfile'
2
2
  require 'openssl'
3
3
 
4
+ require_relative 'features'
4
5
  require_relative 'helper'
5
6
 
7
+ # WWDR Intermediate Certificates in https://www.apple.com/certificateauthority/
8
+ WWDRCA_CERTIFICATES = [
9
+ {
10
+ alias: 'G1',
11
+ sha256: 'ce057691d730f89ca25e916f7335f4c8a15713dcd273a658c024023f8eb809c2',
12
+ url: 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
13
+ },
14
+ {
15
+ alias: 'G2',
16
+ sha256: '9ed4b3b88c6a339cf1387895bda9ca6ea31a6b5ce9edf7511845923b0c8ac94c',
17
+ url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer'
18
+ },
19
+ {
20
+ alias: 'G3',
21
+ sha256: 'dcf21878c77f4198e4b4614f03d696d89c66c66008d4244e1b99161aac91601f',
22
+ url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer'
23
+ },
24
+ {
25
+ alias: 'G4',
26
+ sha256: 'ea4757885538dd8cb59ff4556f676087d83c85e70902c122e42c0808b5bce14c',
27
+ url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer'
28
+ },
29
+ {
30
+ alias: 'G5',
31
+ sha256: '53fd008278e5a595fe1e908ae9c5e5675f26243264a5a6438c023e3ce2870760',
32
+ url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG5.cer'
33
+ },
34
+ {
35
+ alias: 'G6',
36
+ sha256: 'bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30',
37
+ url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer'
38
+ }
39
+ ]
40
+
6
41
  module FastlaneCore
7
42
  # This class checks if a specific certificate is installed on the current mac
8
43
  class CertChecker
@@ -22,7 +57,7 @@ module FastlaneCore
22
57
  end
23
58
 
24
59
  def self.installed_identies(in_keychain: nil)
25
- install_wwdr_certificates unless wwdr_certificates_installed?
60
+ install_missing_wwdr_certificates
26
61
 
27
62
  available = list_available_identities(in_keychain: in_keychain)
28
63
  # Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
@@ -81,37 +116,64 @@ module FastlaneCore
81
116
  `#{commands.join(' ')}`
82
117
  end
83
118
 
84
- def self.wwdr_certificates_installed?
85
- certificate_name = "Apple Worldwide Developer Relations Certification Authority"
86
- keychain = wwdr_keychain
87
- response = Helper.backticks("security find-certificate -a -c '#{certificate_name}' #{keychain.shellescape}", print: FastlaneCore::Globals.verbose?)
88
- certs = response.split("keychain: \"#{keychain}\"").drop(1)
89
- certs.count == 2
119
+ def self.installed_wwdr_certificates
120
+ certificate_name = "Apple Worldwide Developer Relations"
121
+
122
+ # Find all installed WWDRCA certificates
123
+ installed_certs = []
124
+ Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}")
125
+ .lines
126
+ .each do |line|
127
+ if line.start_with?('-----BEGIN CERTIFICATE-----')
128
+ installed_certs << line
129
+ else
130
+ installed_certs.last << line
131
+ end
132
+ end
133
+
134
+ # Get the alias (see `WWDRCA_CERTIFICATES`) of the installed WWDRCA certificates
135
+ installed_certs
136
+ .map do |pem|
137
+ sha256 = Digest::SHA256.hexdigest(OpenSSL::X509::Certificate.new(pem).to_der)
138
+ WWDRCA_CERTIFICATES.find { |c| c[:sha256].casecmp?(sha256) }&.fetch(:alias)
139
+ end
140
+ .compact
90
141
  end
91
142
 
92
- def self.install_wwdr_certificates
93
- install_wwdr_certificate('https://developer.apple.com/certificationauthority/AppleWWDRCA.cer')
94
- install_wwdr_certificate('https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer')
143
+ def self.install_missing_wwdr_certificates
144
+ # Install all Worldwide Developer Relations Intermediate Certificates listed here: https://www.apple.com/certificateauthority/
145
+ missing = WWDRCA_CERTIFICATES.map { |c| c[:alias] } - installed_wwdr_certificates
146
+ missing.each do |cert_alias|
147
+ install_wwdr_certificate(cert_alias)
148
+ end
149
+ missing.count
95
150
  end
96
151
 
97
- def self.install_wwdr_certificate(url)
152
+ def self.install_wwdr_certificate(cert_alias)
153
+ url = WWDRCA_CERTIFICATES.find { |c| c[:alias] == cert_alias }.fetch(:url)
98
154
  file = Tempfile.new(File.basename(url))
99
155
  filename = file.path
100
156
  keychain = wwdr_keychain
101
157
  keychain = "-k #{keychain.shellescape}" unless keychain.empty?
102
158
 
103
- require 'open3'
159
+ # Attempts to fix an issue installing WWDR cert tends to fail on CIs
160
+ # https://github.com/fastlane/fastlane/issues/20960
161
+ curl_extras = ""
162
+ if FastlaneCore::Feature.enabled?('FASTLANE_WWDR_USE_HTTP1_AND_RETRIES')
163
+ curl_extras = "--http1.1 --retry 3 --retry-all-errors "
164
+ end
104
165
 
105
- import_command = "curl -f -o #{filename} #{url} && security import #{filename} #{keychain}"
166
+ import_command = "curl #{curl_extras}-f -o #{filename} #{url} && security import #{filename} #{keychain}"
106
167
  UI.verbose("Installing WWDR Cert: #{import_command}")
107
168
 
108
- stdout, stderr, _status = Open3.capture3(import_command)
169
+ require 'open3'
170
+ stdout, stderr, status = Open3.capture3(import_command)
109
171
  if FastlaneCore::Globals.verbose?
110
172
  UI.command_output(stdout)
111
173
  UI.command_output(stderr)
112
174
  end
113
175
 
114
- unless $?.success?
176
+ unless status.success?
115
177
  UI.verbose("Failed to install WWDR Certificate, checking output to see why")
116
178
  # Check the command output, WWDR might already exist
117
179
  unless /The specified item already exists in the keychain./ =~ stderr
@@ -124,8 +186,8 @@ module FastlaneCore
124
186
 
125
187
  def self.wwdr_keychain
126
188
  priority = [
127
- "security list-keychains -d user",
128
- "security default-keychain -d user"
189
+ "security default-keychain -d user",
190
+ "security list-keychains -d user"
129
191
  ]
130
192
  priority.each do |command|
131
193
  keychains = Helper.backticks(command, print: FastlaneCore::Globals.verbose?).split("\n")
@@ -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")
@@ -73,12 +73,17 @@ module FastlaneCore
73
73
  end
74
74
 
75
75
  def self.fetch_info_plist_with_unzip(path)
76
- list, error, = Open3.capture3("unzip", "-Z", "-1", path)
76
+ entry, error, = Open3.capture3("unzip", "-Z", "-1", path, "*Payload/*.app/Info.plist")
77
+
78
+ # unzip can return multiple Info.plist files if is an embedded app bundle (a WatchKit app)
79
+ # - ContainsWatchApp/Payload/Sample.app/Watch/Sample WatchKit App.app/Info.plist
80
+ # - ContainsWatchApp/Payload/Sample.app/Info.plist
81
+ #
82
+ # we can determine the main Info.plist by the shortest path
83
+ entry = entry.lines.map(&:chomp).min_by(&:size)
84
+
77
85
  UI.command_output(error) unless error.empty?
78
- return nil if list.empty?
79
- entry = list.chomp.split("\n").find do |e|
80
- File.fnmatch("**/Payload/*.app/Info.plist", e, File::FNM_PATHNAME)
81
- end
86
+ return nil if entry.nil? || entry.empty?
82
87
  data, error, = Open3.capture3("unzip", "-p", path, entry)
83
88
  UI.command_output(error) unless error.empty?
84
89
  return nil if data.empty?