fastlane 2.197.0 → 2.200.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +72 -72
  4. data/cert/lib/cert/runner.rb +5 -2
  5. data/deliver/lib/deliver/app_screenshot.rb +8 -0
  6. data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
  7. data/deliver/lib/deliver/runner.rb +1 -1
  8. data/fastlane/lib/.DS_Store +0 -0
  9. data/fastlane/lib/fastlane/.DS_Store +0 -0
  10. data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
  11. data/fastlane/lib/fastlane/actions/download_dsyms.rb +26 -27
  12. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
  14. data/fastlane/lib/fastlane/actions/get_version_number.rb +7 -2
  15. data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
  16. data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
  17. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +18 -1
  18. data/fastlane/lib/fastlane/actions/xcversion.rb +18 -3
  19. data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
  20. data/fastlane/lib/fastlane/version.rb +1 -1
  21. data/fastlane/swift/Actions.swift +1 -1
  22. data/fastlane/swift/Appfile.swift +1 -1
  23. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  24. data/fastlane/swift/ControlCommand.swift +1 -1
  25. data/fastlane/swift/Deliverfile.swift +2 -2
  26. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  27. data/fastlane/swift/Fastlane.swift +65 -20
  28. data/fastlane/swift/Gymfile.swift +2 -2
  29. data/fastlane/swift/GymfileProtocol.swift +6 -2
  30. data/fastlane/swift/LaneFileProtocol.swift +1 -1
  31. data/fastlane/swift/MainProcess.swift +1 -1
  32. data/fastlane/swift/Matchfile.swift +2 -2
  33. data/fastlane/swift/MatchfileProtocol.swift +2 -2
  34. data/fastlane/swift/OptionalConfigValue.swift +1 -1
  35. data/fastlane/swift/Plugins.swift +1 -1
  36. data/fastlane/swift/Precheckfile.swift +2 -2
  37. data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
  38. data/fastlane/swift/RubyCommand.swift +1 -1
  39. data/fastlane/swift/RubyCommandable.swift +1 -1
  40. data/fastlane/swift/Runner.swift +4 -8
  41. data/fastlane/swift/RunnerArgument.swift +1 -1
  42. data/fastlane/swift/Scanfile.swift +2 -2
  43. data/fastlane/swift/ScanfileProtocol.swift +4 -4
  44. data/fastlane/swift/Screengrabfile.swift +2 -2
  45. data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
  46. data/fastlane/swift/Snapshotfile.swift +2 -2
  47. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  48. data/fastlane/swift/SocketClient.swift +1 -1
  49. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  50. data/fastlane/swift/SocketResponse.swift +1 -1
  51. data/fastlane/swift/formatting/Brewfile.lock.json +23 -18
  52. data/fastlane/swift/main.swift +1 -1
  53. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +10 -5
  54. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +41 -7
  55. data/gym/lib/gym/generators/build_command_generator.rb +2 -2
  56. data/gym/lib/gym/options.rb +6 -0
  57. data/match/lib/match/nuke.rb +79 -1
  58. data/match/lib/match/spaceship_ensure.rb +1 -0
  59. data/pem/lib/pem/manager.rb +29 -6
  60. data/pem/lib/pem/options.rb +9 -0
  61. data/pilot/lib/pilot/build_manager.rb +1 -1
  62. data/scan/lib/scan/options.rb +2 -2
  63. data/scan/lib/scan/runner.rb +2 -2
  64. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
  65. data/spaceship/lib/spaceship/client.rb +35 -15
  66. data/spaceship/lib/spaceship/commands_generator.rb +1 -1
  67. data/spaceship/lib/spaceship/connect_api/models/app.rb +43 -0
  68. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
  69. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +2 -0
  70. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +3 -0
  71. data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +73 -0
  72. data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
  73. data/spaceship/lib/spaceship/connect_api/response.rb +13 -0
  74. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +83 -0
  75. data/spaceship/lib/spaceship/connect_api.rb +2 -0
  76. data/spaceship/lib/spaceship/globals.rb +9 -0
  77. data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
  78. data/supply/lib/supply/options.rb +8 -0
  79. data/supply/lib/supply/uploader.rb +6 -2
  80. data/trainer/lib/.DS_Store +0 -0
  81. metadata +25 -19
  82. data/spaceship/lib/spaceship/connect_api/models/.build.rb.swp +0 -0
@@ -391,10 +391,11 @@ module Spaceship
391
391
 
392
392
  keychain_entry = CredentialsManager::AccountManager.new(user: user, password: password)
393
393
  user ||= keychain_entry.user
394
- password = keychain_entry.password
394
+ password = keychain_entry.password(ask_if_missing: !Spaceship::Globals.check_session)
395
395
  end
396
396
 
397
397
  if user.to_s.strip.empty? || password.to_s.strip.empty?
398
+ exit_with_session_state(user, false) if Spaceship::Globals.check_session
398
399
  raise NoUserCredentialsError.new, "No login data provided"
399
400
  end
400
401
 
@@ -413,21 +414,16 @@ module Spaceship
413
414
  end
414
415
  end
415
416
 
416
- # This method is used for both the Apple Dev Portal and App Store Connect
417
- # This will also handle 2 step verification and 2 factor authentication
417
+ # Check if we have a cached/valid session
418
418
  #
419
- # It is called in `send_login_request` of sub classes (which the method `login`, above, transferred over to via `do_login`)
420
- # rubocop:disable Metrics/PerceivedComplexity
421
- def send_shared_login_request(user, password)
422
- # Check if we have a cached/valid session
423
- #
424
- # Background:
425
- # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself -
426
- # but unfortunately also rate limits successful logins. If you call multiple tools in a
427
- # lane (e.g. call match 5 times), this would lock you out of the account for a while.
428
- # By loading existing sessions and checking if they're valid, we're sending less login requests.
429
- # More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108
430
- #
419
+ # Background:
420
+ # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself -
421
+ # but unfortunately also rate limits successful logins. If you call multiple tools in a
422
+ # lane (e.g. call match 5 times), this would lock you out of the account for a while.
423
+ # By loading existing sessions and checking if they're valid, we're sending less login requests.
424
+ # More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108
425
+ #
426
+ def has_valid_session
431
427
  # If there was a successful manual login before, we have a session on disk
432
428
  if load_session_from_file
433
429
  # Check if the session is still valid here
@@ -462,6 +458,23 @@ module Spaceship
462
458
  #
463
459
  # After this point, we sure have no valid session any more and have to create a new one
464
460
  #
461
+ return false
462
+ end
463
+
464
+ # This method is used for both the Apple Dev Portal and App Store Connect
465
+ # This will also handle 2 step verification and 2 factor authentication
466
+ #
467
+ # It is called in `send_login_request` of sub classes (which the method `login`, above, transferred over to via `do_login`)
468
+ # rubocop:disable Metrics/PerceivedComplexity
469
+ def send_shared_login_request(user, password)
470
+ # Check if the cache or FASTLANE_SESSION is still valid
471
+ has_valid_session = self.has_valid_session
472
+
473
+ # Exit if `--check_session` flag was passed
474
+ exit_with_session_state(user, has_valid_session) if Spaceship::Globals.check_session
475
+
476
+ # If the session is valid no need to attempt to generate a new one.
477
+ return true if has_valid_session
465
478
 
466
479
  data = {
467
480
  accountName: user,
@@ -566,6 +579,13 @@ module Spaceship
566
579
  return false
567
580
  end
568
581
 
582
+ # This method is used to log if the session is valid or not and then exit
583
+ # It is called when the `--check_session` flag is passed
584
+ def exit_with_session_state(user, has_valid_session)
585
+ puts("#{has_valid_session ? 'Valid' : 'No valid'} session found (#{user}). Exiting.")
586
+ exit(has_valid_session)
587
+ end
588
+
569
589
  def itc_service_key
570
590
  return @service_key if @service_key
571
591
 
@@ -41,7 +41,7 @@ module Spaceship
41
41
  c.syntax = 'fastlane spaceship spaceauth'
42
42
  c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'
43
43
  c.option('--copy_to_clipboard', 'Whether the session string should be copied to clipboard. For more info see https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth`')
44
-
44
+ c.option('--check_session', 'Check to see if there is a valid session (either in the cache or via FASTLANE_SESSION). Sets the exit code to 0 if the session is valid or 1 if not.') { Spaceship::Globals.check_session = true }
45
45
  c.action do |args, options|
46
46
  Spaceship::SpaceauthRunner.new(username: options.user, copy_to_clipboard: options.copy_to_clipboard).run
47
47
  end
@@ -1,6 +1,7 @@
1
1
  require_relative '../model'
2
2
  require_relative './build'
3
3
 
4
+ # rubocop:disable Metrics/ClassLength
4
5
  module Spaceship
5
6
  class ConnectAPI
6
7
  class App
@@ -414,6 +415,47 @@ module Spaceship
414
415
  })
415
416
  end
416
417
 
418
+ #
419
+ # Review Submissions
420
+ #
421
+
422
+ def get_ready_review_submission(client: nil, platform:, includes: nil)
423
+ client ||= Spaceship::ConnectAPI
424
+ filter = {
425
+ state: [
426
+ Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::READY_FOR_REVIEW
427
+ ].join(","),
428
+ platform: platform
429
+ }
430
+
431
+ return get_review_submissions(client: client, filter: filter, includes: includes).first
432
+ end
433
+
434
+ def get_in_progress_review_submission(client: nil, platform:, includes: nil)
435
+ client ||= Spaceship::ConnectAPI
436
+ filter = {
437
+ state: [
438
+ Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::WAITING_FOR_REVIEW
439
+ ].join(","),
440
+ platform: platform
441
+ }
442
+
443
+ return get_review_submissions(client: client, filter: filter, includes: includes).first
444
+ end
445
+
446
+ # appStoreVersionForReview,items
447
+ def get_review_submissions(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
448
+ client ||= Spaceship::ConnectAPI
449
+ resps = client.get_review_submissions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
450
+ return resps.flat_map(&:to_models)
451
+ end
452
+
453
+ def create_review_submission(client: nil, platform:)
454
+ client ||= Spaceship::ConnectAPI
455
+ resp = client.post_review_submission(app_id: id, platform: platform)
456
+ return resp.to_models.first
457
+ end
458
+
417
459
  #
418
460
  # Users
419
461
  #
@@ -434,3 +476,4 @@ module Spaceship
434
476
  end
435
477
  end
436
478
  end
479
+ # rubocop:enable Metrics/ClassLength
@@ -25,6 +25,7 @@ module Spaceship
25
25
  WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
26
26
  DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
27
27
  DEVELOPER_REMOVED_FROM_SALE = "DEVELOPER_REMOVED_FROM_SALE"
28
+ READY_FOR_REVIEW = "READY_FOR_REVIEW"
28
29
  REJECTED = "REJECTED"
29
30
  PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
30
31
  METADATA_REJECTED = "METADATA_REJECTED"
@@ -38,6 +38,7 @@ module Spaceship
38
38
 
39
39
  APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
40
40
  APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
41
+ APP_WATCH_SERIES_7 = "APP_WATCH_SERIES_7"
41
42
 
42
43
  APP_APPLE_TV = "APP_APPLE_TV"
43
44
 
@@ -85,6 +86,7 @@ module Spaceship
85
86
 
86
87
  APP_WATCH_SERIES_3,
87
88
  APP_WATCH_SERIES_4,
89
+ APP_WATCH_SERIES_7,
88
90
 
89
91
  APP_DESKTOP
90
92
  ]
@@ -41,6 +41,9 @@ module Spaceship
41
41
  MAC_APP_DEVELOPMENT = "MAC_APP_DEVELOPMENT"
42
42
  DEVELOPER_ID_KEXT = "DEVELOPER_ID_KEXT"
43
43
  DEVELOPER_ID_APPLICATION = "DEVELOPER_ID_APPLICATION"
44
+
45
+ # As of 2021-11-09, this is only available with Apple ID auth
46
+ DEVELOPER_ID_INSTALLER = "DEVELOPER_ID_INSTALLER"
44
47
  end
45
48
 
46
49
  def self.type
@@ -0,0 +1,73 @@
1
+ require_relative '../model'
2
+ require_relative './review_submission_item'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class ReviewSubmission
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :platform
10
+ attr_accessor :state
11
+ attr_accessor :submitted_date
12
+
13
+ attr_accessor :app_store_version_for_review
14
+ attr_accessor :items
15
+ attr_accessor :last_updated_by_actor
16
+ attr_accessor :submitted_by_actor
17
+
18
+ module ReviewSubmissionState
19
+ CANCELING = "CANCELING"
20
+ COMPLETE = "COMPLETE"
21
+ IN_REVIEW = "IN_REVIEW"
22
+ READY_FOR_REVIEW = "READY_FOR_REVIEW"
23
+ WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
24
+ end
25
+
26
+ attr_mapping({
27
+ "platform" => "platform",
28
+ "state" => "state",
29
+ "submittedDate" => "submitted_date",
30
+
31
+ "appStoreVersionForReview" => "app_store_version_for_review",
32
+ "items" => "items",
33
+ "lastUpdatedByActor" => "last_updated_by_actor",
34
+ "submittedByActor" => "submitted_by_actor",
35
+ })
36
+
37
+ def self.type
38
+ return "reviewSubmissions"
39
+ end
40
+
41
+ #
42
+ # API
43
+ #
44
+
45
+ # appStoreVersionForReview,items,submittedByActor,lastUpdatedByActor
46
+ def self.get(client: nil, review_submission_id:, includes: nil)
47
+ client ||= Spaceship::ConnectAPI
48
+ resp = client.get_review_submission(review_submission_id: review_submission_id, includes: includes)
49
+ return resp.to_models.first
50
+ end
51
+
52
+ def submit_for_review(client: nil)
53
+ client ||= Spaceship::ConnectAPI
54
+ attributes = { submitted: true }
55
+ resp = client.patch_review_submission(review_submission_id: id, attributes: attributes)
56
+ return resp.to_models.first
57
+ end
58
+
59
+ def cancel_submission(client: nil)
60
+ client ||= Spaceship::ConnectAPI
61
+ attributes = { canceled: true }
62
+ resp = client.patch_review_submission(review_submission_id: id, attributes: attributes)
63
+ return resp.to_models.first
64
+ end
65
+
66
+ def add_app_store_version_to_review_items(client: nil, app_store_version_id:)
67
+ client ||= Spaceship::ConnectAPI
68
+ resp = client.post_review_submission_item(review_submission_id: id, app_store_version_id: app_store_version_id)
69
+ return resp.to_models.first
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,40 @@
1
+ require_relative '../model'
2
+
3
+ module Spaceship
4
+ class ConnectAPI
5
+ class ReviewSubmissionItem
6
+ include Spaceship::ConnectAPI::Model
7
+
8
+ attr_accessor :state
9
+
10
+ attr_accessor :app_store_version_experiment
11
+ attr_accessor :app_store_version
12
+ attr_accessor :app_store_product_page_version
13
+ attr_accessor :app_event
14
+
15
+ attr_mapping({
16
+ "state" => "state",
17
+
18
+ "appStoreVersionExperiment" => "app_store_version_experiment",
19
+ "appStoreVersion" => "app_store_version",
20
+ "appCustomProductPageVersion" => "app_store_product_page_version",
21
+ "appEvent" => "app_event",
22
+ })
23
+
24
+ def self.type
25
+ return "reviewSubmissionItems"
26
+ end
27
+
28
+ #
29
+ # API
30
+ #
31
+
32
+ # appCustomProductPageVersion,appEvent,appStoreVersion,appStoreVersionExperiment
33
+ def self.all(client: nil, review_submission_id:, includes: nil, limit: nil, sort: nil)
34
+ client ||= Spaceship::ConnectAPI
35
+ resps = client.get_review_submission_items(review_submission_id: review_submission_id, includes: includes, limit: limit, sort: sort).all_pages
36
+ return resps.flat_map(&:to_models)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -64,6 +64,19 @@ module Spaceship
64
64
  yield(model)
65
65
  end
66
66
  end
67
+
68
+ def all_pages_each(&block)
69
+ to_models.each do |model|
70
+ yield(model)
71
+ end
72
+
73
+ resp = self
74
+ loop do
75
+ resp = resp.next_page
76
+ break if resp.nil?
77
+ resp.each(&block)
78
+ end
79
+ end
67
80
  end
68
81
  end
69
82
  end
@@ -1126,6 +1126,89 @@ module Spaceship
1126
1126
  tunes_request_client.delete("idfaDeclarations/#{idfa_declaration_id}", params)
1127
1127
  end
1128
1128
 
1129
+ #
1130
+ # reviewSubmissions
1131
+ #
1132
+
1133
+ def get_review_submissions(app_id:, filter: {}, includes: nil, limit: nil, sort: nil)
1134
+ params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
1135
+ tunes_request_client.get("apps/#{app_id}/reviewSubmissions", params)
1136
+ end
1137
+
1138
+ def get_review_submission(review_submission_id:, filter: {}, includes: nil, limit: nil, sort: nil)
1139
+ params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
1140
+ tunes_request_client.get("reviewSubmissions/#{review_submission_id}", params)
1141
+ end
1142
+
1143
+ def post_review_submission(app_id:, platform:)
1144
+ body = {
1145
+ data: {
1146
+ type: "reviewSubmissions",
1147
+ attributes: {
1148
+ platform: platform
1149
+ },
1150
+ relationships: {
1151
+ app: {
1152
+ data: {
1153
+ type: "apps",
1154
+ id: app_id
1155
+ }
1156
+ }
1157
+ }
1158
+ }
1159
+ }
1160
+
1161
+ tunes_request_client.post("reviewSubmissions", body)
1162
+ end
1163
+
1164
+ def patch_review_submission(review_submission_id:, attributes: nil)
1165
+ body = {
1166
+ data: {
1167
+ type: "reviewSubmissions",
1168
+ id: review_submission_id,
1169
+ attributes: attributes,
1170
+ }
1171
+ }
1172
+
1173
+ tunes_request_client.patch("reviewSubmissions/#{review_submission_id}", body)
1174
+ end
1175
+
1176
+ #
1177
+ # reviewSubmissionItems
1178
+ #
1179
+
1180
+ def get_review_submission_items(review_submission_id:, filter: {}, includes: nil, limit: nil, sort: nil)
1181
+ params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
1182
+ tunes_request_client.get("reviewSubmissions/#{review_submission_id}/items", params)
1183
+ end
1184
+
1185
+ def post_review_submission_item(review_submission_id:, app_store_version_id: nil)
1186
+ body = {
1187
+ data: {
1188
+ type: "reviewSubmissionItems",
1189
+ relationships: {
1190
+ reviewSubmission: {
1191
+ data: {
1192
+ type: "reviewSubmissions",
1193
+ id: review_submission_id
1194
+ }
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+
1200
+ unless app_store_version_id.nil?
1201
+ body[:data][:relationships][:appStoreVersion] = {
1202
+ data: {
1203
+ type: "appStoreVersions",
1204
+ id: app_store_version_id
1205
+ }
1206
+ }
1207
+ end
1208
+
1209
+ tunes_request_client.post("reviewSubmissionItems", body)
1210
+ end
1211
+
1129
1212
  #
1130
1213
  # sandboxTesters
1131
1214
  #
@@ -62,6 +62,8 @@ require 'spaceship/connect_api/models/app_store_version_localization'
62
62
  require 'spaceship/connect_api/models/app_store_version_phased_release'
63
63
  require 'spaceship/connect_api/models/app_store_version'
64
64
  require 'spaceship/connect_api/models/idfa_declaration'
65
+ require 'spaceship/connect_api/models/review_submission'
66
+ require 'spaceship/connect_api/models/review_submission_item'
65
67
  require 'spaceship/connect_api/models/reset_ratings_request'
66
68
  require 'spaceship/connect_api/models/sandbox_tester'
67
69
  require 'spaceship/connect_api/models/territory'
@@ -1,5 +1,9 @@
1
1
  module Spaceship
2
2
  class Globals
3
+ class << self
4
+ attr_writer(:check_session)
5
+ end
6
+
3
7
  # if spaceship is run with a FastlaneCore available respect the global state there
4
8
  # otherwise fallback to $verbose
5
9
  def self.verbose?
@@ -8,5 +12,10 @@ module Spaceship
8
12
  end
9
13
  return $verbose
10
14
  end
15
+
16
+ # if spaceship is run with the --check_session flag this value will be set to true
17
+ def self.check_session
18
+ return @check_session
19
+ end
11
20
  end
12
21
  end
@@ -16,7 +16,7 @@ module Spaceship
16
16
 
17
17
  def run
18
18
  begin
19
- puts("Logging into to App Store Connect (#{@username})...")
19
+ puts("Logging into to App Store Connect (#{@username})...") unless Spaceship::Globals.check_session
20
20
  Spaceship::Tunes.login(@username)
21
21
  puts("Successfully logged in to App Store Connect".green)
22
22
  puts("")
@@ -217,6 +217,14 @@ module Supply
217
217
  verify_block: proc do |value|
218
218
  UI.user_error!("'rollout' is no longer a valid track name - please use 'production' instead") if value.casecmp('rollout').zero?
219
219
  end),
220
+ FastlaneCore::ConfigItem.new(key: :track_promote_release_status,
221
+ env_name: "SUPPLY_TRACK_PROMOTE_RELEASE_STATUS",
222
+ optional: true,
223
+ description: "Promoted track release status (used when promoting a track) - valid values are #{Supply::ReleaseStatus::ALL.join(', ')}",
224
+ default_value: Supply::ReleaseStatus::COMPLETED,
225
+ verify_block: proc do |value|
226
+ UI.user_error!("Value must be one of '#{Supply::RELEASE_STATUS}'") unless Supply::ReleaseStatus::ALL.include?(value)
227
+ end),
220
228
  FastlaneCore::ConfigItem.new(key: :validate_only,
221
229
  env_name: "SUPPLY_VALIDATE_ONLY",
222
230
  optional: true,
@@ -164,6 +164,10 @@ module Supply
164
164
  UI.user_error!(%(Cannot specify rollout percentage when the release status is set to 'draft'))
165
165
  end
166
166
 
167
+ if Supply.config[:track_promote_release_status] == Supply::ReleaseStatus::DRAFT && Supply.config[:rollout]
168
+ UI.user_error!(%(Cannot specify rollout percentage when the track promote release status is set to 'draft'))
169
+ end
170
+
167
171
  unless Supply.config[:version_codes_to_retain].nil?
168
172
  Supply.config[:version_codes_to_retain] = Supply.config[:version_codes_to_retain].map(&:to_i)
169
173
  end
@@ -182,7 +186,7 @@ module Supply
182
186
  end
183
187
  else
184
188
  releases = releases.select do |release|
185
- release.status == Supply::ReleaseStatus::COMPLETED
189
+ release.status == Supply.config[:release_status]
186
190
  end
187
191
  end
188
192
 
@@ -200,7 +204,7 @@ module Supply
200
204
  release.status = Supply::ReleaseStatus::IN_PROGRESS
201
205
  release.user_fraction = rollout
202
206
  else
203
- release.status = Supply::ReleaseStatus::COMPLETED
207
+ release.status = Supply.config[:track_promote_release_status]
204
208
  release.user_fraction = nil
205
209
  end
206
210
 
Binary file
metadata CHANGED
@@ -1,38 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.197.0
4
+ version: 2.200.0
5
5
  platform: ruby
6
6
  authors:
7
- - Max Ott
8
- - Danielle Tomlinson
9
7
  - Jimmy Dee
10
- - Manish Rathi
11
- - Manu Wallner
8
+ - Jérôme Lacoste
9
+ - Danielle Tomlinson
12
10
  - Maksym Grebenets
13
- - Iulian Onofrei
11
+ - Matthew Ellis
12
+ - Josh Holtz
13
+ - Luka Mirosevic
14
14
  - Felix Krause
15
- - Helmut Januschka
15
+ - Iulian Onofrei
16
+ - Satoshi Namai
16
17
  - Jan Piotrowski
17
- - Stefan Natchev
18
- - Luka Mirosevic
19
18
  - Joshua Liebowitz
20
- - Fumiya Nakamura
21
- - Kohki Miki
22
- - Satoshi Namai
23
- - Jérôme Lacoste
24
- - Daniel Jankowski
25
- - Aaron Brager
19
+ - Manish Rathi
20
+ - Helmut Januschka
26
21
  - Olivier Halligon
27
- - Matthew Ellis
22
+ - Stefan Natchev
23
+ - Max Ott
28
24
  - Roger Oba
25
+ - Kohki Miki
29
26
  - Andrew McBurney
30
- - Josh Holtz
31
27
  - Jorge Revuelta H
28
+ - Daniel Jankowski
29
+ - Aaron Brager
30
+ - Fumiya Nakamura
31
+ - Manu Wallner
32
32
  autorequire:
33
33
  bindir: bin
34
34
  cert_chain: []
35
- date: 2021-10-22 00:00:00.000000000 Z
35
+ date: 2022-01-13 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: xcodeproj
@@ -993,6 +993,7 @@ files:
993
993
  - deliver/lib/deliver/upload_price_tier.rb
994
994
  - deliver/lib/deliver/upload_screenshots.rb
995
995
  - fastlane/README.md
996
+ - fastlane/lib/.DS_Store
996
997
  - fastlane/lib/assets/ActionDetails.md.erb
997
998
  - fastlane/lib/assets/Actions.md.erb
998
999
  - fastlane/lib/assets/AppfileTemplate
@@ -1011,8 +1012,10 @@ files:
1011
1012
  - fastlane/lib/assets/s3_plist_template.erb
1012
1013
  - fastlane/lib/assets/s3_version_template.erb
1013
1014
  - fastlane/lib/fastlane.rb
1015
+ - fastlane/lib/fastlane/.DS_Store
1014
1016
  - fastlane/lib/fastlane/action.rb
1015
1017
  - fastlane/lib/fastlane/action_collector.rb
1018
+ - fastlane/lib/fastlane/actions/.DS_Store
1016
1019
  - fastlane/lib/fastlane/actions/README.md
1017
1020
  - fastlane/lib/fastlane/actions/actions_helper.rb
1018
1021
  - fastlane/lib/fastlane/actions/adb.rb
@@ -1654,7 +1657,6 @@ files:
1654
1657
  - spaceship/lib/spaceship/connect_api/client.rb
1655
1658
  - spaceship/lib/spaceship/connect_api/file_uploader.rb
1656
1659
  - spaceship/lib/spaceship/connect_api/model.rb
1657
- - spaceship/lib/spaceship/connect_api/models/.build.rb.swp
1658
1660
  - spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb
1659
1661
  - spaceship/lib/spaceship/connect_api/models/app.rb
1660
1662
  - spaceship/lib/spaceship/connect_api/models/app_category.rb
@@ -1705,6 +1707,8 @@ files:
1705
1707
  - spaceship/lib/spaceship/connect_api/models/pre_release_version.rb
1706
1708
  - spaceship/lib/spaceship/connect_api/models/profile.rb
1707
1709
  - spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb
1710
+ - spaceship/lib/spaceship/connect_api/models/review_submission.rb
1711
+ - spaceship/lib/spaceship/connect_api/models/review_submission_item.rb
1708
1712
  - spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb
1709
1713
  - spaceship/lib/spaceship/connect_api/models/territory.rb
1710
1714
  - spaceship/lib/spaceship/connect_api/models/user.rb
@@ -1837,6 +1841,7 @@ files:
1837
1841
  - supply/lib/supply/release_listing.rb
1838
1842
  - supply/lib/supply/setup.rb
1839
1843
  - supply/lib/supply/uploader.rb
1844
+ - trainer/lib/.DS_Store
1840
1845
  homepage: https://fastlane.tools
1841
1846
  licenses:
1842
1847
  - MIT
@@ -1867,6 +1872,7 @@ require_paths:
1867
1872
  - snapshot/lib
1868
1873
  - spaceship/lib
1869
1874
  - supply/lib
1875
+ - trainer/lib
1870
1876
  required_ruby_version: !ruby/object:Gem::Requirement
1871
1877
  requirements:
1872
1878
  - - ">="