fastlane 2.150.0.rc4 → 2.150.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +76 -76
  3. data/deliver/lib/deliver/download_screenshots.rb +48 -26
  4. data/deliver/lib/deliver/runner.rb +4 -1
  5. data/deliver/lib/deliver/submit_for_review.rb +26 -7
  6. data/deliver/lib/deliver/upload_metadata.rb +33 -14
  7. data/deliver/lib/deliver/upload_screenshots.rb +24 -5
  8. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  9. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  10. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  11. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -0
  12. data/fastlane/lib/fastlane/version.rb +1 -1
  13. data/fastlane/swift/Deliverfile.swift +1 -1
  14. data/fastlane/swift/DeliverfileProtocol.swift +6 -6
  15. data/fastlane/swift/Fastlane.swift +22 -19
  16. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  17. data/fastlane/swift/Gymfile.swift +1 -1
  18. data/fastlane/swift/Matchfile.swift +1 -1
  19. data/fastlane/swift/Precheckfile.swift +1 -1
  20. data/fastlane/swift/Scanfile.swift +1 -1
  21. data/fastlane/swift/Screengrabfile.swift +1 -1
  22. data/fastlane/swift/Snapshotfile.swift +1 -1
  23. data/fastlane/swift/SocketClient.swift +2 -1
  24. data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -4
  25. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +0 -1
  26. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -1
  27. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  28. data/produce/lib/produce/itunes_connect.rb +29 -2
  29. data/spaceship/lib/spaceship/connect_api.rb +1 -1
  30. data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
  31. data/spaceship/lib/spaceship/connect_api/client.rb +1 -1
  32. data/spaceship/lib/spaceship/connect_api/models/app.rb +38 -3
  33. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +5 -1
  34. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +54 -1
  35. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +32 -2
  36. data/spaceship/lib/spaceship/connect_api/models/{app_review_attachment.rb → app_store_review_attachment.rb} +6 -6
  37. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +7 -8
  38. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +21 -3
  39. data/spaceship/lib/spaceship/connect_api/models/user.rb +2 -1
  40. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +38 -20
  41. data/spaceship/lib/spaceship/connect_api/users/users.rb +13 -0
  42. metadata +36 -31
@@ -65,8 +65,8 @@ module Deliver
65
65
  end
66
66
 
67
67
  # Crash if any errors happen while deleting
68
- unless errors.empty?
69
- UI.crash!(errors.map(&:message).join("\n"))
68
+ errors.each do |error|
69
+ UI.error(error.message)
70
70
  end
71
71
  end
72
72
  end
@@ -92,10 +92,29 @@ module Deliver
92
92
  localizations = version.get_app_store_version_localizations
93
93
  end
94
94
 
95
- upload_screenshots(screenshots_per_language, localizations)
95
+ upload_screenshots(screenshots_per_language, localizations, options)
96
96
  end
97
97
 
98
- def upload_screenshots(screenshots_per_language, localizations)
98
+ def upload_screenshots(screenshots_per_language, localizations, options)
99
+ # Check if should wait for processing
100
+ # Default to waiting if submitting for review (since needed for submission)
101
+ # Otherwise use enviroment variable
102
+ if ENV["DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING"].nil?
103
+ wait_for_processing = options[:submit_for_review]
104
+ UI.verbose("Setting wait_for_processing from ':submit_for_review' option")
105
+ else
106
+ UI.verbose("Setting wait_for_processing from 'DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING' environment variable")
107
+ wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING")
108
+ end
109
+
110
+ if wait_for_processing
111
+ UI.important("Will wait for screenshot image processing")
112
+ UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process")
113
+ else
114
+ UI.important("Skipping the wait for screenshot image processing (which may affect submission)")
115
+ UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=false to skip waiting for screenshots to process")
116
+ end
117
+
99
118
  # Upload screenshots
100
119
  indized = {} # per language and device type
101
120
 
@@ -166,7 +185,7 @@ module Deliver
166
185
  else
167
186
  indized[localization.locale][set.screenshot_display_type][:count] += 1
168
187
  UI.message("Uploading '#{screenshot.path}'...")
169
- set.upload_screenshot(path: screenshot.path)
188
+ set.upload_screenshot(path: screenshot.path, wait_for_processing: wait_for_processing)
170
189
  end
171
190
  end
172
191
  end
@@ -435,6 +435,10 @@ Omit `build_number` to let _fastlane_ automatically select the latest build numb
435
435
 
436
436
  Use the `submission_information` parameter for additional submission specifiers, including compliance and IDFA settings. Look at the Spaceship's [`app_submission.rb`](https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/tunes/app_submission.rb) file for options. See [this example](https://github.com/artsy/eigen/blob/faa02e2746194d8d7c11899474de9c517435eca4/fastlane/Fastfile#L131-L149).
437
437
 
438
+ ```no-highlight
439
+ fastlane deliver submit_build --build_number 830 --submission_information "{\"export_compliance_uses_encryption\": false, \"add_id_info_uses_idfa\": false }"
440
+ ```
441
+
438
442
  # Credentials
439
443
 
440
444
  A detailed description about how your credentials are handled is available in a [credentials_manager](https://github.com/fastlane/fastlane/tree/master/credentials_manager).
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.150.0.rc4'.freeze
2
+ VERSION = '2.150.1'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -18,4 +18,4 @@ class Deliverfile: DeliverfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -76,7 +76,7 @@ protocol DeliverfileProtocol: class {
76
76
  var appRatingConfigPath: String? { get }
77
77
 
78
78
  /// Extra information for the submission (e.g. compliance specifications, IDFA settings)
79
- var submissionInformation: String? { get }
79
+ var submissionInformation: [String : Any]? { get }
80
80
 
81
81
  /// The ID of your App Store Connect team if you're in multiple teams
82
82
  var teamId: String? { get }
@@ -99,13 +99,13 @@ protocol DeliverfileProtocol: class {
99
99
  /// The default precheck rule level unless otherwise configured
100
100
  var precheckDefaultRuleLevel: String { get }
101
101
 
102
- /// An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
102
+ /// **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
103
103
  var individualMetadataItems: [String] { get }
104
104
 
105
- /// Metadata: The path to the app icon
105
+ /// **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the app icon
106
106
  var appIcon: String? { get }
107
107
 
108
- /// Metadata: The path to the Apple Watch app icon
108
+ /// **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the Apple Watch app icon
109
109
  var appleWatchAppIcon: String? { get }
110
110
 
111
111
  /// Metadata: The copyright notice
@@ -207,7 +207,7 @@ extension DeliverfileProtocol {
207
207
  var resetRatings: Bool { return false }
208
208
  var priceTier: String? { return nil }
209
209
  var appRatingConfigPath: String? { return nil }
210
- var submissionInformation: String? { return nil }
210
+ var submissionInformation: [String : Any]? { return nil }
211
211
  var teamId: String? { return nil }
212
212
  var teamName: String? { return nil }
213
213
  var devPortalTeamId: String? { return nil }
@@ -246,4 +246,4 @@ extension DeliverfileProtocol {
246
246
 
247
247
  // Please don't remove the lines below
248
248
  // They are used to detect outdated files
249
- // FastlaneRunnerAPIVersion [0.9.19]
249
+ // FastlaneRunnerAPIVersion [0.9.20]
@@ -455,9 +455,9 @@ func appledoc(input: Any,
455
455
  - itcProvider: The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
456
456
  - runPrecheckBeforeSubmit: Run precheck before submitting to app review
457
457
  - precheckDefaultRuleLevel: The default precheck rule level unless otherwise configured
458
- - individualMetadataItems: An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
459
- - appIcon: Metadata: The path to the app icon
460
- - appleWatchAppIcon: Metadata: The path to the Apple Watch app icon
458
+ - individualMetadataItems: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
459
+ - appIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the app icon
460
+ - appleWatchAppIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the Apple Watch app icon
461
461
  - copyright: Metadata: The copyright notice
462
462
  - primaryCategory: Metadata: The english name of the primary category (e.g. `Business`, `Books`)
463
463
  - secondaryCategory: Metadata: The english name of the secondary category (e.g. `Business`, `Books`)
@@ -515,7 +515,7 @@ func appstore(username: String,
515
515
  resetRatings: Bool = false,
516
516
  priceTier: Any? = nil,
517
517
  appRatingConfigPath: String? = nil,
518
- submissionInformation: Any? = nil,
518
+ submissionInformation: [String : Any]? = nil,
519
519
  teamId: Any? = nil,
520
520
  teamName: String? = nil,
521
521
  devPortalTeamId: String? = nil,
@@ -2248,7 +2248,7 @@ func createAppOnManagedPlayStore(jsonKey: String? = nil,
2248
2248
  - sku: SKU Number (e.g. '1234')
2249
2249
  - platform: The platform to use (optional)
2250
2250
  - platforms: The platforms to use (optional)
2251
- - language: Primary Language (e.g. 'English', 'German')
2251
+ - language: Primary Language (e.g. 'en-US', 'fr-FR')
2252
2252
  - companyName: The name of your company. Only required if it's the first app you create
2253
2253
  - skipItc: Skip the creation of the app on App Store Connect
2254
2254
  - itcUsers: Array of App Store Connect users. If provided, you can limit access to this newly created app for users with the App Manager, Developer, Marketer or Sales roles
@@ -2505,9 +2505,9 @@ func deleteKeychain(name: String? = nil,
2505
2505
  - itcProvider: The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
2506
2506
  - runPrecheckBeforeSubmit: Run precheck before submitting to app review
2507
2507
  - precheckDefaultRuleLevel: The default precheck rule level unless otherwise configured
2508
- - individualMetadataItems: An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
2509
- - appIcon: Metadata: The path to the app icon
2510
- - appleWatchAppIcon: Metadata: The path to the Apple Watch app icon
2508
+ - individualMetadataItems: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
2509
+ - appIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the app icon
2510
+ - appleWatchAppIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the Apple Watch app icon
2511
2511
  - copyright: Metadata: The copyright notice
2512
2512
  - primaryCategory: Metadata: The english name of the primary category (e.g. `Business`, `Books`)
2513
2513
  - secondaryCategory: Metadata: The english name of the secondary category (e.g. `Business`, `Books`)
@@ -2565,7 +2565,7 @@ func deliver(username: Any = deliverfile.username,
2565
2565
  resetRatings: Bool = deliverfile.resetRatings,
2566
2566
  priceTier: Any? = deliverfile.priceTier,
2567
2567
  appRatingConfigPath: Any? = deliverfile.appRatingConfigPath,
2568
- submissionInformation: Any? = deliverfile.submissionInformation,
2568
+ submissionInformation: [String : Any]? = deliverfile.submissionInformation,
2569
2569
  teamId: Any? = deliverfile.teamId,
2570
2570
  teamName: Any? = deliverfile.teamName,
2571
2571
  devPortalTeamId: Any? = deliverfile.devPortalTeamId,
@@ -2799,7 +2799,7 @@ func downloadDsyms(username: String,
2799
2799
  func downloadFromPlayStore(packageName: String,
2800
2800
  versionName: String? = nil,
2801
2801
  track: String = "production",
2802
- metadataPath: String? = nil,
2802
+ metadataPath: String = "./metadata",
2803
2803
  key: String? = nil,
2804
2804
  issuer: String? = nil,
2805
2805
  jsonKey: String? = nil,
@@ -5343,7 +5343,7 @@ func println(message: String? = nil) {
5343
5343
  - sku: SKU Number (e.g. '1234')
5344
5344
  - platform: The platform to use (optional)
5345
5345
  - platforms: The platforms to use (optional)
5346
- - language: Primary Language (e.g. 'English', 'German')
5346
+ - language: Primary Language (e.g. 'en-US', 'fr-FR')
5347
5347
  - companyName: The name of your company. Only required if it's the first app you create
5348
5348
  - skipItc: Skip the creation of the app on App Store Connect
5349
5349
  - itcUsers: Array of App Store Connect users. If provided, you can limit access to this newly created app for users with the App Manager, Developer, Marketer or Sales roles
@@ -7097,6 +7097,7 @@ func splunkmint(dsym: String? = nil,
7097
7097
  - packagePath: Change working directory before any other operation
7098
7098
  - xcconfig: Use xcconfig file to override swift package generate-xcodeproj defaults
7099
7099
  - configuration: Build with configuration (debug|release) [default: debug]
7100
+ - disableSandbox: Disable using the sandbox when executing subprocesses
7100
7101
  - xcprettyOutput: Specifies the output type for xcpretty. eg. 'test', or 'simple'
7101
7102
  - xcprettyArgs: Pass in xcpretty additional command line arguments (e.g. '--test --no-color' or '--tap --no-utf'), requires xcpretty_output to be specified also
7102
7103
  - verbose: Increase verbosity of informational output
@@ -7106,6 +7107,7 @@ func spm(command: String = "build",
7106
7107
  packagePath: String? = nil,
7107
7108
  xcconfig: String? = nil,
7108
7109
  configuration: String? = nil,
7110
+ disableSandbox: Bool = false,
7109
7111
  xcprettyOutput: String? = nil,
7110
7112
  xcprettyArgs: String? = nil,
7111
7113
  verbose: Bool = false) {
@@ -7114,6 +7116,7 @@ func spm(command: String = "build",
7114
7116
  RubyCommand.Argument(name: "package_path", value: packagePath),
7115
7117
  RubyCommand.Argument(name: "xcconfig", value: xcconfig),
7116
7118
  RubyCommand.Argument(name: "configuration", value: configuration),
7119
+ RubyCommand.Argument(name: "disable_sandbox", value: disableSandbox),
7117
7120
  RubyCommand.Argument(name: "xcpretty_output", value: xcprettyOutput),
7118
7121
  RubyCommand.Argument(name: "xcpretty_args", value: xcprettyArgs),
7119
7122
  RubyCommand.Argument(name: "verbose", value: verbose)])
@@ -7196,7 +7199,7 @@ func supply(packageName: String,
7196
7199
  releaseStatus: String = "completed",
7197
7200
  track: String = "production",
7198
7201
  rollout: String? = nil,
7199
- metadataPath: String? = nil,
7202
+ metadataPath: String = "./metadata",
7200
7203
  key: String? = nil,
7201
7204
  issuer: String? = nil,
7202
7205
  jsonKey: String? = nil,
@@ -8099,9 +8102,9 @@ func uploadSymbolsToSentry(apiHost: String = "https://app.getsentry.com/api/0",
8099
8102
  - itcProvider: The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
8100
8103
  - runPrecheckBeforeSubmit: Run precheck before submitting to app review
8101
8104
  - precheckDefaultRuleLevel: The default precheck rule level unless otherwise configured
8102
- - individualMetadataItems: An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
8103
- - appIcon: Metadata: The path to the app icon
8104
- - appleWatchAppIcon: Metadata: The path to the Apple Watch app icon
8105
+ - individualMetadataItems: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
8106
+ - appIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the app icon
8107
+ - appleWatchAppIcon: **DEPRECATED!** Removed after the migration to the new App Store Connect API in June 2020 - Metadata: The path to the Apple Watch app icon
8105
8108
  - copyright: Metadata: The copyright notice
8106
8109
  - primaryCategory: Metadata: The english name of the primary category (e.g. `Business`, `Books`)
8107
8110
  - secondaryCategory: Metadata: The english name of the secondary category (e.g. `Business`, `Books`)
@@ -8159,7 +8162,7 @@ func uploadToAppStore(username: String,
8159
8162
  resetRatings: Bool = false,
8160
8163
  priceTier: Any? = nil,
8161
8164
  appRatingConfigPath: String? = nil,
8162
- submissionInformation: Any? = nil,
8165
+ submissionInformation: [String : Any]? = nil,
8163
8166
  teamId: Any? = nil,
8164
8167
  teamName: String? = nil,
8165
8168
  devPortalTeamId: String? = nil,
@@ -8305,7 +8308,7 @@ func uploadToPlayStore(packageName: String,
8305
8308
  releaseStatus: String = "completed",
8306
8309
  track: String = "production",
8307
8310
  rollout: String? = nil,
8308
- metadataPath: String? = nil,
8311
+ metadataPath: String = "./metadata",
8309
8312
  key: String? = nil,
8310
8313
  issuer: String? = nil,
8311
8314
  jsonKey: String? = nil,
@@ -8815,7 +8818,7 @@ func xcov(workspace: String? = nil,
8815
8818
  coverallsServiceJobId: String? = nil,
8816
8819
  coverallsRepoToken: String? = nil,
8817
8820
  xcconfig: String? = nil,
8818
- ideFoundationPath: String = "/Applications/Xcode-11.5.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
8821
+ ideFoundationPath: String = "/Applications/Xcode.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
8819
8822
  legacySupport: Bool = false) {
8820
8823
  let command = RubyCommand(commandID: "", methodName: "xcov", className: nil, args: [RubyCommand.Argument(name: "workspace", value: workspace),
8821
8824
  RubyCommand.Argument(name: "project", value: project),
@@ -8960,4 +8963,4 @@ let snapshotfile: Snapshotfile = Snapshotfile()
8960
8963
 
8961
8964
  // Please don't remove the lines below
8962
8965
  // They are used to detect outdated files
8963
- // FastlaneRunnerAPIVersion [0.9.71]
8966
+ // FastlaneRunnerAPIVersion [0.9.72]
@@ -18,4 +18,4 @@ class Gymfile: GymfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -18,4 +18,4 @@ class Matchfile: MatchfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -18,4 +18,4 @@ class Precheckfile: PrecheckfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -18,4 +18,4 @@ class Scanfile: ScanfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -18,4 +18,4 @@ class Screengrabfile: ScreengrabfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -18,4 +18,4 @@ class Snapshotfile: SnapshotfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.149.1
21
+ // Generated with fastlane 2.150.1
@@ -34,7 +34,7 @@ class SocketClient: NSObject {
34
34
  }
35
35
 
36
36
  static let connectTimeoutSeconds = 2
37
- static let defaultCommandTimeoutSeconds = 3_600 // Hopefully 1 hr is enough ¯\_(ツ)_/¯
37
+ static let defaultCommandTimeoutSeconds = 10_800 // 3 hours
38
38
  static let doneToken = "done" // TODO: remove these
39
39
  static let cancelToken = "cancelFastlaneRun"
40
40
 
@@ -118,6 +118,7 @@ class SocketClient: NSObject {
118
118
  public func send(rubyCommand: RubyCommandable) {
119
119
  verbose(message: "sending: \(rubyCommand.json)")
120
120
  send(string: rubyCommand.json)
121
+ writeSemaphore.signal()
121
122
  }
122
123
 
123
124
  public func sendComplete() {
@@ -6,7 +6,7 @@ module FastlaneCore
6
6
  class BuildWatcher
7
7
  class << self
8
8
  # @return The build we waited for. This method will always return a build
9
- 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)
9
+ 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)
10
10
  # Warn about train_version being removed in the future
11
11
  if train_version
12
12
  UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
@@ -23,7 +23,7 @@ module FastlaneCore
23
23
 
24
24
  showed_info = false
25
25
  loop do
26
- matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform)
26
+ matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
27
27
 
28
28
  if matched_build.nil? && !showed_info
29
29
  UI.important("Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997")
@@ -55,7 +55,7 @@ module FastlaneCore
55
55
  return version.instance_of?(String) ? version.split('.').map { |s| s.to_i.to_s }.join('.') : version
56
56
  end
57
57
 
58
- def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil)
58
+ def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil, select_latest: false)
59
59
  # Get build deliveries (newly uploaded processing builds)
60
60
  watched_app_version = remove_version_leading_zeros(version: watched_app_version)
61
61
  watched_build_version = remove_version_leading_zeros(version: watched_build_version)
@@ -69,7 +69,7 @@ module FastlaneCore
69
69
 
70
70
  # Raise error if more than 1 build is returned
71
71
  # This should never happen but need to inform the user if it does
72
- if matched_builds.size > 1
72
+ if matched_builds.size > 1 && !select_latest
73
73
  error_builds = matched_builds.map do |build|
74
74
  "#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
75
75
  end.join("\n")
@@ -37,7 +37,6 @@ module FastlaneCore
37
37
 
38
38
  def self.fetch_info_plist_file(path)
39
39
  UI.user_error!("Could not find file at path '#{path}'") unless File.exist?(path)
40
- Zip.validate_entry_sizes = true # https://github.com/rubyzip/rubyzip/releases/tag/v2.0.0
41
40
  Zip::File.open(path, "rb") do |zipfile|
42
41
  file = zipfile.glob('**/Payload/*.app/Info.plist').first
43
42
  return nil unless file
@@ -113,7 +113,7 @@ module FastlaneCore
113
113
  else
114
114
  # `security` only works on Mac, fallback to `openssl`
115
115
  # via https://stackoverflow.com/a/14379814/252627
116
- decoded = `openssl smime -inform der -verify -noverify -in #{path} 2> #{err}`
116
+ decoded = `openssl smime -inform der -verify -noverify -in #{path.shellescape} 2> #{err}`
117
117
  end
118
118
  UI.error("Failure to decode #{path}. Exit: #{$?.exitstatus}: #{File.read(err)}") if $?.exitstatus != 0
119
119
  decoded
@@ -21,6 +21,13 @@ module Produce
21
21
  UI.success("App '#{Produce.config[:app_identifier]}' already exists (#{application.id}), nothing to do on App Store Connect")
22
22
  # Nothing to do here
23
23
  else
24
+ emails = Produce.config[:itc_users] || []
25
+ user_ids = []
26
+ unless emails.empty?
27
+ UI.message("Verifying users exist before creating app...")
28
+ user_ids = find_user_ids(emails: emails)
29
+ end
30
+
24
31
  UI.success("Creating new app '#{Produce.config[:app_name]}' on App Store Connect")
25
32
 
26
33
  platforms = Produce.config[:platforms] || [Produce.config[:platform]]
@@ -29,7 +36,6 @@ module Produce
29
36
  Spaceship::ConnectAPI::Platform.map(platform)
30
37
  end
31
38
 
32
- # Produce.config[:company_name]
33
39
  # Produce.config[:itc_users]
34
40
  application = Spaceship::ConnectAPI::App.create(
35
41
  name: Produce.config[:app_name],
@@ -37,7 +43,8 @@ module Produce
37
43
  sku: Produce.config[:sku].to_s,
38
44
  primary_locale: language,
39
45
  bundle_id: app_identifier,
40
- platforms: platforms
46
+ platforms: platforms,
47
+ company_name: Produce.config[:company_name]
41
48
  )
42
49
 
43
50
  application = fetch_application
@@ -60,12 +67,32 @@ module Produce
60
67
  application.ensure_version!(Produce.config[:app_version], platform: platform) if Produce.config[:app_version]
61
68
  end
62
69
 
70
+ # Add users to app
71
+ unless user_ids.empty?
72
+ application.add_users(user_ids: user_ids)
73
+ UI.message("Successfuly added #{user_ids.size} #{user_ids.count == 1 ? 'user' : 'users'} to app")
74
+ end
75
+
63
76
  UI.success("Successfully created new app '#{Produce.config[:app_name]}' on App Store Connect with ID #{application.id}")
64
77
  end
65
78
 
66
79
  return application.id
67
80
  end
68
81
 
82
+ def find_user_ids(emails: nil)
83
+ emails ||= []
84
+ users = Spaceship::ConnectAPI::User.all.select do |user|
85
+ emails.include?(user.email)
86
+ end
87
+
88
+ diff_emails = emails - users.map(&:email)
89
+ unless diff_emails.empty?
90
+ raise "Could not find users with emails of: #{diff_emails.join(',')}"
91
+ end
92
+
93
+ return users.map(&:id)
94
+ end
95
+
69
96
  private
70
97
 
71
98
  def platform