fastlane 2.205.1 → 2.206.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +88 -88
  3. data/cert/lib/cert/runner.rb +15 -7
  4. data/deliver/lib/deliver/options.rb +5 -0
  5. data/deliver/lib/deliver/runner.rb +45 -0
  6. data/{frameit/lib/frameit/.offsets.rb.swp → fastlane/lib/fastlane/actions/.supply.rb.swp} +0 -0
  7. data/fastlane/lib/fastlane/actions/danger.rb +14 -0
  8. data/fastlane/lib/fastlane/actions/run_tests.rb +1 -7
  9. data/fastlane/lib/fastlane/actions/setup_ci.rb +13 -4
  10. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +9 -0
  11. data/fastlane/lib/fastlane/cli_tools_distributor.rb +20 -0
  12. data/fastlane/lib/fastlane/version.rb +1 -1
  13. data/fastlane/swift/Deliverfile.swift +1 -1
  14. data/fastlane/swift/DeliverfileProtocol.swift +5 -1
  15. data/fastlane/swift/Fastlane.swift +39 -3
  16. data/fastlane/swift/Gymfile.swift +1 -1
  17. data/fastlane/swift/GymfileProtocol.swift +1 -1
  18. data/fastlane/swift/Matchfile.swift +1 -1
  19. data/fastlane/swift/MatchfileProtocol.swift +5 -1
  20. data/fastlane/swift/Precheckfile.swift +1 -1
  21. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  22. data/fastlane/swift/Scanfile.swift +1 -1
  23. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  24. data/fastlane/swift/Screengrabfile.swift +1 -1
  25. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  26. data/fastlane/swift/Snapshotfile.swift +1 -1
  27. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  28. data/fastlane/swift/formatting/Brewfile.lock.json +13 -13
  29. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +90 -0
  30. data/frameit/lib/frameit/device_types.rb +7 -0
  31. data/match/lib/match/importer.rb +3 -1
  32. data/match/lib/match/options.rb +5 -0
  33. data/match/lib/match/runner.rb +9 -3
  34. data/match/lib/match/storage/google_cloud_storage.rb +7 -6
  35. data/scan/lib/scan/options.rb +6 -1
  36. data/scan/lib/scan/runner.rb +10 -2
  37. data/sigh/lib/sigh/runner.rb +2 -1
  38. data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
  39. data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -2
  40. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +2 -1
  41. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +1 -0
  42. data/spaceship/lib/spaceship/connect_api/models/user.rb +5 -0
  43. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +24 -2
  44. data/spaceship/lib/spaceship/connect_api/token.rb +5 -2
  45. metadata +23 -28
  46. data/frameit/lib/frameit/.device.rb.swp +0 -0
  47. data/frameit/lib/frameit/.device_types.rb.swp +0 -0
  48. data/frameit/lib/frameit/.editor.rb.swp +0 -0
  49. data/frameit/lib/frameit/.runner.rb.swp +0 -0
  50. data/frameit/lib/frameit/.screenshot.rb.swp +0 -0
@@ -48,7 +48,8 @@ module Match
48
48
  team_id: params[:team_id],
49
49
  team_name: params[:team_name],
50
50
  api_key_path: params[:api_key_path],
51
- api_key: params[:api_key]
51
+ api_key: params[:api_key],
52
+ skip_google_cloud_account_confirmation: params[:skip_google_cloud_account_confirmation]
52
53
  )
53
54
  end
54
55
 
@@ -62,7 +63,8 @@ module Match
62
63
  team_id: nil,
63
64
  team_name: nil,
64
65
  api_key_path: nil,
65
- api_key: nil)
66
+ api_key: nil,
67
+ skip_google_cloud_account_confirmation: nil)
66
68
  @type = type if type
67
69
  @platform = platform if platform
68
70
  @google_cloud_project_id = google_cloud_project_id if google_cloud_project_id
@@ -76,8 +78,7 @@ module Match
76
78
  @api_key_path = api_key_path
77
79
  @api_key = api_key
78
80
 
79
- @google_cloud_keys_file = ensure_keys_file_exists(google_cloud_keys_file, google_cloud_project_id)
80
-
81
+ @google_cloud_keys_file = ensure_keys_file_exists(google_cloud_keys_file, google_cloud_project_id, skip_google_cloud_account_confirmation)
81
82
  if self.google_cloud_keys_file.to_s.length > 0
82
83
  # Extract the Project ID from the `JSON` file
83
84
  # so the user doesn't have to provide it manually
@@ -223,7 +224,7 @@ module Match
223
224
 
224
225
  # This method will make sure the keys file exists
225
226
  # If it's missing, it will help the user set things up
226
- def ensure_keys_file_exists(google_cloud_keys_file, google_cloud_project_id)
227
+ def ensure_keys_file_exists(google_cloud_keys_file, google_cloud_project_id, skip_google_cloud_account_confirmation)
227
228
  if google_cloud_keys_file && File.exist?(google_cloud_keys_file)
228
229
  return google_cloud_keys_file
229
230
  end
@@ -251,7 +252,7 @@ module Match
251
252
  # we can continue and ask the user if they want to use a keys file.
252
253
  end
253
254
 
254
- if application_default_keys && UI.confirm("Do you want to use this system's Google Cloud application default keys?")
255
+ if application_default_keys && (skip_google_cloud_account_confirmation || UI.confirm("Do you want to use this system's Google Cloud application default keys?"))
255
256
  return nil
256
257
  end
257
258
  end
@@ -522,7 +522,12 @@ module Scan
522
522
  env_name: 'SCAN_NUMBER_OF_RETRIES',
523
523
  description: "The number of times a test can fail",
524
524
  type: Integer,
525
- default_value: 0)
525
+ default_value: 0),
526
+ FastlaneCore::ConfigItem.new(key: :fail_build,
527
+ env_name: "SCAN_FAIL_BUILD",
528
+ description: "Should this step stop the build if the tests fail? Set this to false if you're using trainer",
529
+ type: Boolean,
530
+ default_value: true)
526
531
 
527
532
  ]
528
533
  end
@@ -305,11 +305,19 @@ module Scan
305
305
  if number_of_failures > 0
306
306
  open_report
307
307
 
308
- UI.test_failure!("Tests have failed")
308
+ if Scan.config[:fail_build]
309
+ UI.test_failure!("Tests have failed")
310
+ else
311
+ UI.error("Tests have failed")
312
+ end
309
313
  end
310
314
 
311
315
  unless tests_exit_status == 0
312
- UI.test_failure!("Test execution failed. Exit status: #{tests_exit_status}")
316
+ if Scan.config[:fail_build]
317
+ UI.test_failure!("Test execution failed. Exit status: #{tests_exit_status}")
318
+ else
319
+ UI.error("Test execution failed. Exit status: #{tests_exit_status}")
320
+ end
313
321
  end
314
322
 
315
323
  open_report
@@ -251,7 +251,8 @@ module Sigh
251
251
  ]
252
252
  elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT
253
253
  types = [
254
- Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION
254
+ Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION,
255
+ Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION_G2
255
256
  ]
256
257
  else
257
258
  types = [
@@ -157,8 +157,6 @@ module Spaceship
157
157
  end
158
158
 
159
159
  def with_asc_retry(tries = 5, &_block)
160
- tries = 1 if Object.const_defined?("SpecHelper")
161
-
162
160
  response = yield
163
161
 
164
162
  status = response.status if response
@@ -170,9 +168,16 @@ module Spaceship
170
168
 
171
169
  return response
172
170
  rescue UnauthorizedAccessError => error
173
- # Catch unathorized access and re-raising
174
- # There is no need to try again
175
- raise error
171
+ tries -= 1
172
+ puts(error) if Spaceship::Globals.verbose?
173
+ if tries.zero?
174
+ raise error
175
+ else
176
+ msg = "Token has expired or has been revoked! Trying to refresh..."
177
+ puts(msg) if Spaceship::Globals.verbose?
178
+ @token.refresh!
179
+ retry
180
+ end
176
181
  rescue TimeoutRetryError => error
177
182
  tries -= 1
178
183
  puts(error) if Spaceship::Globals.verbose?
@@ -362,9 +362,8 @@ module Spaceship
362
362
  def get_build_deliveries(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
363
363
  client ||= Spaceship::ConnectAPI
364
364
  filter ||= {}
365
- filter[:app] = id
366
365
 
367
- resps = client.get_build_deliveries(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
366
+ resps = client.get_build_deliveries(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
368
367
  return resps.flat_map(&:to_models)
369
368
  end
370
369
 
@@ -27,7 +27,8 @@ module Spaceship
27
27
  def self.all(client: nil, app_id: nil, version: nil, build_number: nil)
28
28
  client ||= Spaceship::ConnectAPI
29
29
  resps = client.get_build_deliveries(
30
- filter: { app: app_id, cfBundleShortVersionString: version, cfBundleVersion: build_number },
30
+ app_id: app_id,
31
+ filter: { cfBundleShortVersionString: version, cfBundleVersion: build_number },
31
32
  limit: 1
32
33
  ).all_pages
33
34
  return resps.flat_map(&:to_models)
@@ -41,6 +41,7 @@ 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
+ DEVELOPER_ID_APPLICATION_G2 = "DEVELOPER_ID_APPLICATION_G2"
44
45
 
45
46
  # As of 2021-11-09, this is only available with Apple ID auth
46
47
  DEVELOPER_ID_INSTALLER = "DEVELOPER_ID_INSTALLER"
@@ -57,6 +57,11 @@ module Spaceship
57
57
  return all(client: client, filter: { email: email }, includes: includes)
58
58
  end
59
59
 
60
+ def delete!(client: nil)
61
+ client ||= Spaceship::ConnectAPI
62
+ client.delete_user(user_id: id)
63
+ end
64
+
60
65
  def get_visible_apps(client: nil, limit: nil)
61
66
  client ||= Spaceship::ConnectAPI
62
67
  resp = client.get_user_visible_apps(user_id: id, limit: limit)
@@ -290,6 +290,28 @@ module Spaceship
290
290
  test_flight_request_client.post("bulkBetaTesterAssignments", body)
291
291
  end
292
292
 
293
+ # attributes - {email: "", firstName: "", lastName: ""}
294
+ def post_beta_tester_assignment(beta_group_ids: [], attributes: {})
295
+ body = {
296
+ data: {
297
+ attributes: attributes,
298
+ relationships: {
299
+ betaGroups: {
300
+ data: beta_group_ids.map do |id|
301
+ {
302
+ type: "betaGroups",
303
+ id: id
304
+ }
305
+ end
306
+ }
307
+ },
308
+ type: "betaTesters"
309
+ }
310
+ }
311
+
312
+ test_flight_request_client.post("betaTesters", body)
313
+ end
314
+
293
315
  def add_beta_tester_to_group(beta_group_id: nil, beta_tester_ids: nil)
294
316
  beta_tester_ids || []
295
317
  body = {
@@ -448,9 +470,9 @@ module Spaceship
448
470
  # buildDeliveries
449
471
  #
450
472
 
451
- def get_build_deliveries(filter: {}, includes: nil, limit: nil, sort: nil)
473
+ def get_build_deliveries(app_id:, filter: {}, includes: nil, limit: nil, sort: nil)
452
474
  params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
453
- test_flight_request_client.get("buildDeliveries", params)
475
+ test_flight_request_client.get("apps/#{app_id}/buildDeliveries", params)
454
476
  end
455
477
 
456
478
  #
@@ -90,14 +90,17 @@ module Spaceship
90
90
  end
91
91
 
92
92
  def refresh!
93
- @expiration = Time.now + @duration
93
+ now = Time.now
94
+ @expiration = now + @duration
94
95
 
95
96
  header = {
96
- kid: key_id
97
+ kid: key_id,
98
+ typ: 'JWT'
97
99
  }
98
100
 
99
101
  payload = {
100
102
  iss: issuer_id,
103
+ iat: now.to_i,
101
104
  exp: @expiration.to_i,
102
105
  aud: 'appstoreconnect-v1'
103
106
  }
metadata CHANGED
@@ -1,39 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.205.1
4
+ version: 2.206.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Namai
8
- - Jérôme Lacoste
9
- - Danielle Tomlinson
10
- - Andrew McBurney
11
- - Łukasz Grabowski
12
- - Roger Oba
13
- - Iulian Onofrei
14
- - Max Ott
15
- - Aaron Brager
16
- - Joshua Liebowitz
17
- - Stefan Natchev
18
- - Daniel Jankowski
8
+ - Maksym Grebenets
19
9
  - Felix Krause
20
- - Fumiya Nakamura
10
+ - Olivier Halligon
11
+ - Jimmy Dee
12
+ - Jorge Revuelta H
21
13
  - Luka Mirosevic
14
+ - Kohki Miki
15
+ - Joshua Liebowitz
22
16
  - Jan Piotrowski
23
- - Josh Holtz
24
- - Matthew Ellis
25
17
  - Helmut Januschka
26
- - Manish Rathi
27
- - Jimmy Dee
28
- - Maksym Grebenets
18
+ - Fumiya Nakamura
19
+ - Iulian Onofrei
20
+ - Stefan Natchev
29
21
  - Manu Wallner
30
- - Olivier Halligon
31
- - Jorge Revuelta H
32
- - Kohki Miki
22
+ - Max Ott
23
+ - Roger Oba
24
+ - Josh Holtz
25
+ - Łukasz Grabowski
26
+ - Aaron Brager
27
+ - Andrew McBurney
28
+ - Daniel Jankowski
29
+ - Jérôme Lacoste
30
+ - Danielle Tomlinson
31
+ - Manish Rathi
32
+ - Matthew Ellis
33
33
  autorequire:
34
34
  bindir: bin
35
35
  cert_chain: []
36
- date: 2022-03-24 00:00:00.000000000 Z
36
+ date: 2022-05-21 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: xcodeproj
@@ -1017,6 +1017,7 @@ files:
1017
1017
  - fastlane/lib/fastlane/action.rb
1018
1018
  - fastlane/lib/fastlane/action_collector.rb
1019
1019
  - fastlane/lib/fastlane/actions/.DS_Store
1020
+ - fastlane/lib/fastlane/actions/.supply.rb.swp
1020
1021
  - fastlane/lib/fastlane/actions/README.md
1021
1022
  - fastlane/lib/fastlane/actions/actions_helper.rb
1022
1023
  - fastlane/lib/fastlane/actions/adb.rb
@@ -1458,12 +1459,6 @@ files:
1458
1459
  - frameit/README.md
1459
1460
  - frameit/lib/assets/empty.png
1460
1461
  - frameit/lib/frameit.rb
1461
- - frameit/lib/frameit/.device.rb.swp
1462
- - frameit/lib/frameit/.device_types.rb.swp
1463
- - frameit/lib/frameit/.editor.rb.swp
1464
- - frameit/lib/frameit/.offsets.rb.swp
1465
- - frameit/lib/frameit/.runner.rb.swp
1466
- - frameit/lib/frameit/.screenshot.rb.swp
1467
1462
  - frameit/lib/frameit/commands_generator.rb
1468
1463
  - frameit/lib/frameit/config_parser.rb
1469
1464
  - frameit/lib/frameit/dependency_checker.rb
Binary file
Binary file
Binary file
Binary file