fastlane 2.162.0 → 2.163.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +72 -72
  3. data/deliver/lib/deliver/module.rb +2 -0
  4. data/deliver/lib/deliver/options.rb +3 -3
  5. data/deliver/lib/deliver/upload_metadata.rb +12 -3
  6. data/fastlane/lib/fastlane/actions/.register_device.rb.swp +0 -0
  7. data/fastlane/lib/fastlane/actions/.register_devices.rb.swp +0 -0
  8. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +39 -3
  9. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +9 -0
  10. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +1 -0
  11. data/fastlane/lib/fastlane/actions/get_certificates.rb +1 -0
  12. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -0
  13. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +15 -0
  14. data/fastlane/lib/fastlane/actions/register_device.rb +46 -5
  15. data/fastlane/lib/fastlane/actions/register_devices.rb +46 -15
  16. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -0
  17. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +3 -2
  18. data/fastlane/lib/fastlane/version.rb +1 -1
  19. data/fastlane/swift/Deliverfile.swift +1 -1
  20. data/fastlane/swift/DeliverfileProtocol.swift +4 -4
  21. data/fastlane/swift/Fastlane.swift +46 -16
  22. data/fastlane/swift/Gymfile.swift +1 -1
  23. data/fastlane/swift/GymfileProtocol.swift +1 -1
  24. data/fastlane/swift/LaneFileProtocol.swift +15 -19
  25. data/fastlane/swift/MainProcess.swift +1 -1
  26. data/fastlane/swift/Matchfile.swift +1 -1
  27. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  28. data/fastlane/swift/Precheckfile.swift +1 -1
  29. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  30. data/fastlane/swift/Scanfile.swift +1 -1
  31. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  32. data/fastlane/swift/Screengrabfile.swift +1 -1
  33. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  34. data/fastlane/swift/Snapshotfile.swift +1 -1
  35. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  36. data/fastlane/swift/main.swift +1 -1
  37. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +2 -2
  38. data/sigh/lib/sigh/download_all.rb +16 -4
  39. data/snapshot/lib/assets/SnapshotHelper.swift +4 -0
  40. data/spaceship/lib/spaceship/client.rb +7 -3
  41. data/spaceship/lib/spaceship/connect_api.rb +24 -0
  42. data/spaceship/lib/spaceship/connect_api/api_client.rb +9 -0
  43. data/spaceship/lib/spaceship/connect_api/models/device.rb +5 -0
  44. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +17 -0
  45. data/spaceship/lib/spaceship/connect_api/token.rb +6 -1
  46. metadata +17 -15
@@ -12,6 +12,8 @@ module Fastlane
12
12
  end
13
13
 
14
14
  def self.run(params)
15
+ platform = Spaceship::ConnectAPI::BundleIdPlatform.map(params[:platform])
16
+
15
17
  if params[:devices]
16
18
  new_devices = params[:devices].map do |name, udid|
17
19
  [udid, name]
@@ -37,40 +39,54 @@ module Fastlane
37
39
  end
38
40
 
39
41
  require 'spaceship'
40
- credentials = CredentialsManager::AccountManager.new(user: params[:username])
41
- Spaceship.login(credentials.user, credentials.password)
42
- Spaceship.select_team
43
-
44
- UI.message("Fetching list of currently registered devices...")
45
- all_platforms = Set[params[:platform]]
46
- new_devices.each do |device|
47
- next if device[2].nil?
48
- all_platforms.add(device[2])
42
+ if (token = api_token(params))
43
+ UI.message("Using App Store Connect API token...")
44
+ Spaceship::ConnectAPI.token = token
45
+ else
46
+ UI.message("Login to App Store Connect (#{params[:username]})")
47
+ credentials = CredentialsManager::AccountManager.new(user: params[:username])
48
+ Spaceship::ConnectAPI.login(credentials.user, credentials.password, use_portal: true, use_tunes: false)
49
+ UI.message("Login successful")
49
50
  end
50
- supported_platforms = all_platforms.select { |platform| self.is_supported?(platform.to_sym) }
51
51
 
52
- existing_devices = supported_platforms.flat_map { |platform| Spaceship::Device.all(mac: platform == "mac") }
52
+ UI.message("Fetching list of currently registered devices...")
53
+ existing_devices = Spaceship::ConnectAPI::Device.all
53
54
 
54
55
  device_objs = new_devices.map do |device|
55
56
  next if existing_devices.map(&:udid).include?(device[0])
56
57
 
58
+ device_platform = platform
59
+
57
60
  device_platform_supported = !device[2].nil? && self.is_supported?(device[2].to_sym)
58
- mac = (device_platform_supported ? device[2] : params[:platform]) == "mac"
61
+ if device_platform_supported
62
+ if device[2] == "mac"
63
+ device_platform = Spaceship::ConnectAPI::BundleIdPlatform::MAC_OS
64
+ else
65
+ device_platform = Spaceship::ConnectAPI::BundleIdPlatform::IOS
66
+ end
67
+ end
59
68
 
60
- try_create_device(name: device[1], udid: device[0], mac: mac)
69
+ try_create_device(name: device[1], platform: device_platform, udid: device[0])
61
70
  end
62
71
 
63
72
  UI.success("Successfully registered new devices.")
64
73
  return device_objs
65
74
  end
66
75
 
67
- def self.try_create_device(name: nil, udid: nil, mac: false)
68
- Spaceship::Device.create!(name: name, udid: udid, mac: mac)
76
+ def self.try_create_device(name: nil, platform: nil, udid: nil)
77
+ Spaceship::ConnectAPI::Device.create(name: name, platform: platform, udid: udid)
69
78
  rescue => ex
70
79
  UI.error(ex.to_s)
71
80
  UI.crash!("Failed to register new device (name: #{name}, UDID: #{udid})")
72
81
  end
73
82
 
83
+ def self.api_token(params)
84
+ params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
85
+ api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
86
+ api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
87
+ return api_token
88
+ end
89
+
74
90
  #####################################################
75
91
  # @!group Documentation
76
92
  #####################################################
@@ -98,6 +114,21 @@ module Fastlane
98
114
  verify_block: proc do |value|
99
115
  UI.user_error!("Could not find file '#{value}'") unless File.exist?(value)
100
116
  end),
117
+ FastlaneCore::ConfigItem.new(key: :api_key_path,
118
+ env_name: "FL_REGISTER_DEVICES_API_KEY_PATH",
119
+ description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
120
+ optional: true,
121
+ conflicting_options: [:api_key],
122
+ verify_block: proc do |value|
123
+ UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
124
+ end),
125
+ FastlaneCore::ConfigItem.new(key: :api_key,
126
+ env_name: "FL_REGISTER_DEVICES_API_KEY",
127
+ description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
128
+ type: Hash,
129
+ optional: true,
130
+ sensitive: true,
131
+ conflicting_options: [:api_key_path]),
101
132
  FastlaneCore::ConfigItem.new(key: :team_id,
102
133
  env_name: "REGISTER_DEVICES_TEAM_ID",
103
134
  code_gen_sensitive: true,
@@ -10,6 +10,7 @@ module Fastlane
10
10
  require 'match'
11
11
 
12
12
  params.load_configuration_file("Matchfile")
13
+ params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
13
14
  Match::Runner.new.run(params)
14
15
 
15
16
  define_profile_type(params)
@@ -12,6 +12,7 @@ module Fastlane
12
12
  config[:screenshots_path] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] if Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
13
13
  config[:ipa] = Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] if Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
14
14
  config[:pkg] = Actions.lane_context[SharedValues::PKG_OUTPUT_PATH] if Actions.lane_context[SharedValues::PKG_OUTPUT_PATH]
15
+ config[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
15
16
 
16
17
  return config if Helper.test?
17
18
  Deliver::Runner.new(config).run
@@ -26,7 +27,7 @@ module Fastlane
26
27
  [
27
28
  "Using _upload_to_app_store_ after _build_app_ and _capture_screenshots_ will automatically upload the latest ipa and screenshots with no other configuration.",
28
29
  "",
29
- "If you don't want a PDF report for App Store builds, use the `:force` option.",
30
+ "If you don't want to verify an HTML preview for App Store builds, use the `:force` option.",
30
31
  "This is useful when running _fastlane_ on your Continuous Integration server:",
31
32
  "`_upload_to_app_store_(force: true)`",
32
33
  "If your account is on multiple teams and you need to tell the `iTMSTransporter` which 'provider' to use, you can set the `:itc_provider` option to pass this info."
@@ -50,7 +51,7 @@ module Fastlane
50
51
  def self.example_code
51
52
  [
52
53
  'upload_to_app_store(
53
- force: true, # Set to true to skip PDF verification
54
+ force: true, # Set to true to skip verification of HTML preview
54
55
  itc_provider: "abcde12345" # pass a specific value to the iTMSTransporter -itc_provider option
55
56
  )',
56
57
  'deliver # alias for "upload_to_app_store"',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.162.0'.freeze
2
+ VERSION = '2.163.0'.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
@@ -17,4 +17,4 @@ public class Deliverfile: DeliverfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.162.0
20
+ // Generated with fastlane 2.163.0
@@ -53,7 +53,7 @@ public protocol DeliverfileProtocol: class {
53
53
  /// Don’t create or update the app version that is being prepared for submission
54
54
  var skipAppVersionUpdate: Bool { get }
55
55
 
56
- /// Skip the HTML report file verification
56
+ /// Skip verification of HTML preview file
57
57
  var force: Bool { get }
58
58
 
59
59
  /// Clear all previously uploaded screenshots before uploading the new ones
@@ -66,7 +66,7 @@ public protocol DeliverfileProtocol: class {
66
66
  var rejectIfPossible: Bool { get }
67
67
 
68
68
  /// Should the app be automatically released once it's approved? (Can not be used together with `auto_release_date`)
69
- var automaticRelease: Bool { get }
69
+ var automaticRelease: Bool? { get }
70
70
 
71
71
  /// Date in milliseconds for automatically releasing on pending approval (Can not be used together with `automatic_release`)
72
72
  var autoReleaseDate: Int? { get }
@@ -211,7 +211,7 @@ public extension DeliverfileProtocol {
211
211
  var overwriteScreenshots: Bool { return false }
212
212
  var submitForReview: Bool { return false }
213
213
  var rejectIfPossible: Bool { return false }
214
- var automaticRelease: Bool { return false }
214
+ var automaticRelease: Bool? { return nil }
215
215
  var autoReleaseDate: Int? { return nil }
216
216
  var phasedRelease: Bool { return false }
217
217
  var resetRatings: Bool { return false }
@@ -256,4 +256,4 @@ public extension DeliverfileProtocol {
256
256
 
257
257
  // Please don't remove the lines below
258
258
  // They are used to detect outdated files
259
- // FastlaneRunnerAPIVersion [0.9.45]
259
+ // FastlaneRunnerAPIVersion [0.9.46]
@@ -98,6 +98,8 @@ public func addGitTag(tag: String? = nil,
98
98
  Returns the current build_number of either live or edit version
99
99
 
100
100
  - parameters:
101
+ - apiKeyPath: Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)
102
+ - apiKey: Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)
101
103
  - initialBuildNumber: sets the build number to given value if no build is in current train
102
104
  - appIdentifier: The bundle identifier of your app
103
105
  - username: Your Apple ID Username
@@ -110,7 +112,9 @@ public func addGitTag(tag: String? = nil,
110
112
  Returns the current build number of either the live or testflight version - it is useful for getting the build_number of the current or ready-for-sale app version, and it also works on non-live testflight version.
111
113
  If you need to handle more build-trains please see `latest_testflight_build_number`.
112
114
  */
113
- public func appStoreBuildNumber(initialBuildNumber: Any,
115
+ public func appStoreBuildNumber(apiKeyPath: String? = nil,
116
+ apiKey: [String: Any]? = nil,
117
+ initialBuildNumber: Any,
114
118
  appIdentifier: String,
115
119
  username: String,
116
120
  teamId: Any? = nil,
@@ -119,7 +123,9 @@ public func appStoreBuildNumber(initialBuildNumber: Any,
119
123
  platform: String = "ios",
120
124
  teamName: String? = nil)
121
125
  {
122
- let command = RubyCommand(commandID: "", methodName: "app_store_build_number", className: nil, args: [RubyCommand.Argument(name: "initial_build_number", value: initialBuildNumber),
126
+ let command = RubyCommand(commandID: "", methodName: "app_store_build_number", className: nil, args: [RubyCommand.Argument(name: "api_key_path", value: apiKeyPath),
127
+ RubyCommand.Argument(name: "api_key", value: apiKey),
128
+ RubyCommand.Argument(name: "initial_build_number", value: initialBuildNumber),
123
129
  RubyCommand.Argument(name: "app_identifier", value: appIdentifier),
124
130
  RubyCommand.Argument(name: "username", value: username),
125
131
  RubyCommand.Argument(name: "team_id", value: teamId),
@@ -138,6 +144,7 @@ public func appStoreBuildNumber(initialBuildNumber: Any,
138
144
  - issuerId: The issuer ID
139
145
  - keyFilepath: The path to the key p8 file
140
146
  - keyContent: The content of the key p8 file
147
+ - isKeyContentBase64: Whether :key_content is Base64 encoded or not
141
148
  - duration: The token session duration
142
149
  - inHouse: Is App Store or Enterprise (in house) team? App Store Connect API cannot not determine this on its own (yet)
143
150
 
@@ -147,6 +154,7 @@ public func appStoreConnectApiKey(keyId: String,
147
154
  issuerId: String,
148
155
  keyFilepath: String? = nil,
149
156
  keyContent: String? = nil,
157
+ isKeyContentBase64: Bool = false,
150
158
  duration: Int? = nil,
151
159
  inHouse: Bool? = nil)
152
160
  {
@@ -154,6 +162,7 @@ public func appStoreConnectApiKey(keyId: String,
154
162
  RubyCommand.Argument(name: "issuer_id", value: issuerId),
155
163
  RubyCommand.Argument(name: "key_filepath", value: keyFilepath),
156
164
  RubyCommand.Argument(name: "key_content", value: keyContent),
165
+ RubyCommand.Argument(name: "is_key_content_base64", value: isKeyContentBase64),
157
166
  RubyCommand.Argument(name: "duration", value: duration),
158
167
  RubyCommand.Argument(name: "in_house", value: inHouse)])
159
168
  _ = runner.executeCommand(command)
@@ -479,7 +488,7 @@ public func appledoc(input: Any,
479
488
  - skipScreenshots: Don't upload the screenshots
480
489
  - skipMetadata: Don't upload the metadata (e.g. title, description). This will still upload screenshots
481
490
  - skipAppVersionUpdate: Don’t create or update the app version that is being prepared for submission
482
- - force: Skip the HTML report file verification
491
+ - force: Skip verification of HTML preview file
483
492
  - overwriteScreenshots: Clear all previously uploaded screenshots before uploading the new ones
484
493
  - submitForReview: Submit the new version for Review after uploading everything
485
494
  - rejectIfPossible: Rejects the previously submitted build if it's in a state where it's possible
@@ -527,7 +536,7 @@ public func appledoc(input: Any,
527
536
 
528
537
  Using _upload_to_app_store_ after _build_app_ and _capture_screenshots_ will automatically upload the latest ipa and screenshots with no other configuration.
529
538
 
530
- If you don't want a PDF report for App Store builds, use the `:force` option.
539
+ If you don't want to verify an HTML preview for App Store builds, use the `:force` option.
531
540
  This is useful when running _fastlane_ on your Continuous Integration server:
532
541
  `_upload_to_app_store_(force: true)`
533
542
  If your account is on multiple teams and you need to tell the `iTMSTransporter` which 'provider' to use, you can set the `:itc_provider` option to pass this info.
@@ -553,7 +562,7 @@ public func appstore(apiKeyPath: String? = nil,
553
562
  overwriteScreenshots: Bool = false,
554
563
  submitForReview: Bool = false,
555
564
  rejectIfPossible: Bool = false,
556
- automaticRelease: Bool = false,
565
+ automaticRelease: Bool? = nil,
557
566
  autoReleaseDate: Int? = nil,
558
567
  phasedRelease: Bool = false,
559
568
  resetRatings: Bool = false,
@@ -2600,7 +2609,7 @@ public func deleteKeychain(name: String? = nil,
2600
2609
  - skipScreenshots: Don't upload the screenshots
2601
2610
  - skipMetadata: Don't upload the metadata (e.g. title, description). This will still upload screenshots
2602
2611
  - skipAppVersionUpdate: Don’t create or update the app version that is being prepared for submission
2603
- - force: Skip the HTML report file verification
2612
+ - force: Skip verification of HTML preview file
2604
2613
  - overwriteScreenshots: Clear all previously uploaded screenshots before uploading the new ones
2605
2614
  - submitForReview: Submit the new version for Review after uploading everything
2606
2615
  - rejectIfPossible: Rejects the previously submitted build if it's in a state where it's possible
@@ -2648,7 +2657,7 @@ public func deleteKeychain(name: String? = nil,
2648
2657
 
2649
2658
  Using _upload_to_app_store_ after _build_app_ and _capture_screenshots_ will automatically upload the latest ipa and screenshots with no other configuration.
2650
2659
 
2651
- If you don't want a PDF report for App Store builds, use the `:force` option.
2660
+ If you don't want to verify an HTML preview for App Store builds, use the `:force` option.
2652
2661
  This is useful when running _fastlane_ on your Continuous Integration server:
2653
2662
  `_upload_to_app_store_(force: true)`
2654
2663
  If your account is on multiple teams and you need to tell the `iTMSTransporter` which 'provider' to use, you can set the `:itc_provider` option to pass this info.
@@ -2674,7 +2683,7 @@ public func deliver(apiKeyPath: Any? = deliverfile.apiKeyPath,
2674
2683
  overwriteScreenshots: Bool = deliverfile.overwriteScreenshots,
2675
2684
  submitForReview: Bool = deliverfile.submitForReview,
2676
2685
  rejectIfPossible: Bool = deliverfile.rejectIfPossible,
2677
- automaticRelease: Bool = deliverfile.automaticRelease,
2686
+ automaticRelease: Bool? = deliverfile.automaticRelease,
2678
2687
  autoReleaseDate: Int? = deliverfile.autoReleaseDate,
2679
2688
  phasedRelease: Bool = deliverfile.phasedRelease,
2680
2689
  resetRatings: Bool = deliverfile.resetRatings,
@@ -4595,6 +4604,8 @@ public func jira(url: String,
4595
4604
  Fetches most recent build number from TestFlight
4596
4605
 
4597
4606
  - parameters:
4607
+ - apiKeyPath: Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)
4608
+ - apiKey: Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)
4598
4609
  - live: Query the live version (ready-for-sale)
4599
4610
  - appIdentifier: The bundle identifier of your app
4600
4611
  - username: Your Apple ID Username
@@ -4609,7 +4620,9 @@ public func jira(url: String,
4609
4620
  Provides a way to have `increment_build_number` be based on the latest build you uploaded to iTC.
4610
4621
  Fetches the most recent build number from TestFlight based on the version number. Provides a way to have `increment_build_number` be based on the latest build you uploaded to iTC.
4611
4622
  */
4612
- @discardableResult public func latestTestflightBuildNumber(live: Bool = false,
4623
+ @discardableResult public func latestTestflightBuildNumber(apiKeyPath: String? = nil,
4624
+ apiKey: [String: Any]? = nil,
4625
+ live: Bool = false,
4613
4626
  appIdentifier: String,
4614
4627
  username: String,
4615
4628
  version: String? = nil,
@@ -4618,7 +4631,9 @@ public func jira(url: String,
4618
4631
  teamId: Any? = nil,
4619
4632
  teamName: String? = nil) -> Int
4620
4633
  {
4621
- let command = RubyCommand(commandID: "", methodName: "latest_testflight_build_number", className: nil, args: [RubyCommand.Argument(name: "live", value: live),
4634
+ let command = RubyCommand(commandID: "", methodName: "latest_testflight_build_number", className: nil, args: [RubyCommand.Argument(name: "api_key_path", value: apiKeyPath),
4635
+ RubyCommand.Argument(name: "api_key", value: apiKey),
4636
+ RubyCommand.Argument(name: "live", value: live),
4622
4637
  RubyCommand.Argument(name: "app_identifier", value: appIdentifier),
4623
4638
  RubyCommand.Argument(name: "username", value: username),
4624
4639
  RubyCommand.Argument(name: "version", value: version),
@@ -5772,7 +5787,10 @@ public func recreateSchemes(project: String) {
5772
5787
 
5773
5788
  - parameters:
5774
5789
  - name: Provide the name of the device to register as
5790
+ - platform: Provide the platform of the device to register as (ios, mac)
5775
5791
  - udid: Provide the UDID of the device to register as
5792
+ - apiKeyPath: Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)
5793
+ - apiKey: Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)
5776
5794
  - teamId: The ID of your Developer Portal team if you're in multiple teams
5777
5795
  - teamName: The name of your Developer Portal team if you're in multiple teams
5778
5796
  - username: Optional: Your Apple ID
@@ -5782,13 +5800,19 @@ public func recreateSchemes(project: String) {
5782
5800
  The action will connect to the Apple Developer Portal using the username you specified in your `Appfile` with `apple_id`, but you can override it using the `:username` option.
5783
5801
  */
5784
5802
  @discardableResult public func registerDevice(name: String,
5803
+ platform: String = "ios",
5785
5804
  udid: String,
5805
+ apiKeyPath: String? = nil,
5806
+ apiKey: [String: Any]? = nil,
5786
5807
  teamId: String? = nil,
5787
5808
  teamName: String? = nil,
5788
- username: String) -> String
5809
+ username: String? = nil) -> String
5789
5810
  {
5790
5811
  let command = RubyCommand(commandID: "", methodName: "register_device", className: nil, args: [RubyCommand.Argument(name: "name", value: name),
5812
+ RubyCommand.Argument(name: "platform", value: platform),
5791
5813
  RubyCommand.Argument(name: "udid", value: udid),
5814
+ RubyCommand.Argument(name: "api_key_path", value: apiKeyPath),
5815
+ RubyCommand.Argument(name: "api_key", value: apiKey),
5792
5816
  RubyCommand.Argument(name: "team_id", value: teamId),
5793
5817
  RubyCommand.Argument(name: "team_name", value: teamName),
5794
5818
  RubyCommand.Argument(name: "username", value: username)])
@@ -5801,6 +5825,8 @@ public func recreateSchemes(project: String) {
5801
5825
  - parameters:
5802
5826
  - devices: A hash of devices, with the name as key and the UDID as value
5803
5827
  - devicesFile: Provide a path to a file with the devices to register. For the format of the file see the examples
5828
+ - apiKeyPath: Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)
5829
+ - apiKey: Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)
5804
5830
  - teamId: The ID of your Developer Portal team if you're in multiple teams
5805
5831
  - teamName: The name of your Developer Portal team if you're in multiple teams
5806
5832
  - username: Optional: Your Apple ID
@@ -5812,6 +5838,8 @@ public func recreateSchemes(project: String) {
5812
5838
  */
5813
5839
  public func registerDevices(devices: [String: Any]? = nil,
5814
5840
  devicesFile: String? = nil,
5841
+ apiKeyPath: String? = nil,
5842
+ apiKey: [String: Any]? = nil,
5815
5843
  teamId: String? = nil,
5816
5844
  teamName: String? = nil,
5817
5845
  username: String,
@@ -5819,6 +5847,8 @@ public func registerDevices(devices: [String: Any]? = nil,
5819
5847
  {
5820
5848
  let command = RubyCommand(commandID: "", methodName: "register_devices", className: nil, args: [RubyCommand.Argument(name: "devices", value: devices),
5821
5849
  RubyCommand.Argument(name: "devices_file", value: devicesFile),
5850
+ RubyCommand.Argument(name: "api_key_path", value: apiKeyPath),
5851
+ RubyCommand.Argument(name: "api_key", value: apiKey),
5822
5852
  RubyCommand.Argument(name: "team_id", value: teamId),
5823
5853
  RubyCommand.Argument(name: "team_name", value: teamName),
5824
5854
  RubyCommand.Argument(name: "username", value: username),
@@ -8451,7 +8481,7 @@ public func uploadSymbolsToSentry(apiHost: String = "https://app.getsentry.com/a
8451
8481
  - skipScreenshots: Don't upload the screenshots
8452
8482
  - skipMetadata: Don't upload the metadata (e.g. title, description). This will still upload screenshots
8453
8483
  - skipAppVersionUpdate: Don’t create or update the app version that is being prepared for submission
8454
- - force: Skip the HTML report file verification
8484
+ - force: Skip verification of HTML preview file
8455
8485
  - overwriteScreenshots: Clear all previously uploaded screenshots before uploading the new ones
8456
8486
  - submitForReview: Submit the new version for Review after uploading everything
8457
8487
  - rejectIfPossible: Rejects the previously submitted build if it's in a state where it's possible
@@ -8499,7 +8529,7 @@ public func uploadSymbolsToSentry(apiHost: String = "https://app.getsentry.com/a
8499
8529
 
8500
8530
  Using _upload_to_app_store_ after _build_app_ and _capture_screenshots_ will automatically upload the latest ipa and screenshots with no other configuration.
8501
8531
 
8502
- If you don't want a PDF report for App Store builds, use the `:force` option.
8532
+ If you don't want to verify an HTML preview for App Store builds, use the `:force` option.
8503
8533
  This is useful when running _fastlane_ on your Continuous Integration server:
8504
8534
  `_upload_to_app_store_(force: true)`
8505
8535
  If your account is on multiple teams and you need to tell the `iTMSTransporter` which 'provider' to use, you can set the `:itc_provider` option to pass this info.
@@ -8525,7 +8555,7 @@ public func uploadToAppStore(apiKeyPath: String? = nil,
8525
8555
  overwriteScreenshots: Bool = false,
8526
8556
  submitForReview: Bool = false,
8527
8557
  rejectIfPossible: Bool = false,
8528
- automaticRelease: Bool = false,
8558
+ automaticRelease: Bool? = nil,
8529
8559
  autoReleaseDate: Int? = nil,
8530
8560
  phasedRelease: Bool = false,
8531
8561
  resetRatings: Bool = false,
@@ -9211,7 +9241,7 @@ public func xcov(workspace: String? = nil,
9211
9241
  coverallsServiceJobId: String? = nil,
9212
9242
  coverallsRepoToken: String? = nil,
9213
9243
  xcconfig: String? = nil,
9214
- ideFoundationPath: String = "/Applications/Xcode-11.5.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
9244
+ ideFoundationPath: String = "/Applications/Xcode-11.7.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
9215
9245
  legacySupport: Bool = false)
9216
9246
  {
9217
9247
  let command = RubyCommand(commandID: "", methodName: "xcov", className: nil, args: [RubyCommand.Argument(name: "workspace", value: workspace),
@@ -9357,4 +9387,4 @@ public let snapshotfile = Snapshotfile()
9357
9387
 
9358
9388
  // Please don't remove the lines below
9359
9389
  // They are used to detect outdated files
9360
- // FastlaneRunnerAPIVersion [0.9.98]
9390
+ // FastlaneRunnerAPIVersion [0.9.99]
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.162.0
20
+ // Generated with fastlane 2.163.0
@@ -184,4 +184,4 @@ public extension GymfileProtocol {
184
184
 
185
185
  // Please don't remove the lines below
186
186
  // They are used to detect outdated files
187
- // FastlaneRunnerAPIVersion [0.9.48]
187
+ // FastlaneRunnerAPIVersion [0.9.49]
@@ -12,18 +12,18 @@ import Foundation
12
12
 
13
13
  public protocol LaneFileProtocol: class {
14
14
  var fastlaneVersion: String { get }
15
- static func runLane(from fastfile: LaneFile?, named: String, parameters: [String: String]) -> Bool
15
+ static func runLane(from fastfile: LaneFile?, named lane: String, with parameters: [String: String]) -> Bool
16
16
 
17
17
  func recordLaneDescriptions()
18
- func beforeAll()
19
- func afterAll(currentLane: String)
18
+ func beforeAll(with lane: String)
19
+ func afterAll(with lane: String)
20
20
  func onError(currentLane: String, errorInfo: String)
21
21
  }
22
22
 
23
23
  public extension LaneFileProtocol {
24
24
  var fastlaneVersion: String { return "" } // Defaults to "" because that means any is fine
25
- func beforeAll() {} // No-op by default
26
- func afterAll(currentLane _: String) {} // No-op by default
25
+ func beforeAll(with lane: String) {} // No-op by default
26
+ func afterAll(with lane: String) {} // No-op by default
27
27
  func onError(currentLane _: String, errorInfo _: String) {} // No-op by default
28
28
  func recordLaneDescriptions() {} // No-op by default
29
29
  }
@@ -32,11 +32,6 @@ public extension LaneFileProtocol {
32
32
  open class LaneFile: NSObject, LaneFileProtocol {
33
33
  private(set) static var fastfileInstance: LaneFile?
34
34
 
35
- // Called before any lane is executed.
36
- private func setUpAllTheThings() {
37
- LaneFile.fastfileInstance!.beforeAll()
38
- }
39
-
40
35
  private static func trimLaneFromName(laneName: String) -> String {
41
36
  return String(laneName.prefix(laneName.count - 4))
42
37
  }
@@ -95,12 +90,12 @@ open class LaneFile: NSObject, LaneFileProtocol {
95
90
  }
96
91
  }
97
92
 
98
- public static func runLane(from fastfile: LaneFile?, named: String, parameters: [String: String]) -> Bool {
99
- log(message: "Running lane: \(named)")
93
+ public static func runLane(from fastfile: LaneFile?, named lane: String, with parameters: [String: String]) -> Bool {
94
+ log(message: "Running lane: \(lane)")
100
95
  #if !SWIFT_PACKAGE
101
96
  // When not in SPM environment, we load the Fastfile from its `className()`.
102
97
  loadFastfile()
103
- guard let fastfileInstance: LaneFile = self.fastfileInstance else {
98
+ guard let fastfileInstance = self.fastfileInstance as? Fastfile else {
104
99
  let message = "Unable to instantiate class named: \(className())"
105
100
  log(message: message)
106
101
  fatalError(message)
@@ -109,14 +104,14 @@ open class LaneFile: NSObject, LaneFileProtocol {
109
104
  // When in SPM environment, we can't load the Fastfile from its `className()` because the executable is in
110
105
  // another scope, so `className()` won't be the expected Fastfile. Instead, we load the Fastfile as a Lanefile
111
106
  // in a static way, by parameter.
112
- guard let fastfileInstance: LaneFile = fastfile else {
107
+ guard let fastfileInstance = fastfile else {
113
108
  log(message: "Found nil instance of fastfile")
114
109
  preconditionFailure()
115
110
  }
116
111
  self.fastfileInstance = fastfileInstance
117
112
  #endif
118
113
  let currentLanes = lanes
119
- let lowerCasedLaneRequested = named.lowercased()
114
+ let lowerCasedLaneRequested = lane.lowercased()
120
115
 
121
116
  guard let laneMethod = currentLanes[lowerCasedLaneRequested] else {
122
117
  let laneNames = laneFunctionNames.map { laneFuctionName in
@@ -127,7 +122,7 @@ open class LaneFile: NSObject, LaneFileProtocol {
127
122
  }
128
123
  }.joined(separator: ", ")
129
124
 
130
- let message = "[!] Could not find lane '\(named)'. Available lanes: \(laneNames)"
125
+ let message = "[!] Could not find lane '\(lane)'. Available lanes: \(laneNames)"
131
126
  log(message: message)
132
127
 
133
128
  let shutdownCommand = ControlCommand(commandType: .cancel(cancelReason: .clientError), message: message)
@@ -136,14 +131,15 @@ open class LaneFile: NSObject, LaneFileProtocol {
136
131
  }
137
132
 
138
133
  // Call all methods that need to be called before we start calling lanes.
139
- fastfileInstance.setUpAllTheThings()
134
+ fastfileInstance.beforeAll(with: lane)
140
135
 
141
136
  // We need to catch all possible errors here and display a nice message.
142
137
  _ = fastfileInstance.perform(NSSelectorFromString(laneMethod), with: parameters)
143
138
 
144
139
  // Call only on success.
145
- fastfileInstance.afterAll(currentLane: named)
146
- log(message: "Done running lane: \(named) 🚀")
140
+ fastfileInstance.afterAll(with: lane)
141
+
142
+ log(message: "Done running lane: \(lane) 🚀")
147
143
  return true
148
144
  }
149
145
  }