fastlane 2.189.0 → 2.193.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +92 -92
  3. data/deliver/lib/deliver/app_screenshot.rb +2 -1
  4. data/deliver/lib/deliver/app_screenshot_iterator.rb +2 -2
  5. data/deliver/lib/deliver/loader.rb +1 -1
  6. data/deliver/lib/deliver/options.rb +6 -0
  7. data/deliver/lib/deliver/runner.rb +9 -1
  8. data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
  9. data/deliver/lib/deliver/sync_screenshots.rb +200 -0
  10. data/fastlane/lib/assets/completions/completion.bash +4 -1
  11. data/fastlane/lib/assets/completions/completion.zsh +6 -5
  12. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/bundle_install.rb +13 -1
  14. data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +25 -1
  15. data/fastlane/lib/fastlane/actions/create_xcframework.rb +97 -17
  16. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +2 -2
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +2 -2
  18. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -1
  19. data/fastlane/lib/fastlane/actions/notarize.rb +77 -1
  20. data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
  21. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
  22. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +3 -1
  23. data/fastlane/lib/fastlane/actions/zip.rb +86 -21
  24. data/fastlane/lib/fastlane/features.rb +3 -0
  25. data/fastlane/lib/fastlane/version.rb +1 -1
  26. data/fastlane/swift/Deliverfile.swift +1 -1
  27. data/fastlane/swift/DeliverfileProtocol.swift +5 -1
  28. data/fastlane/swift/Fastlane.swift +121 -25
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane/swift/formatting/Brewfile.lock.json +9 -9
  42. data/fastlane_core/lib/fastlane_core/build_watcher.rb +25 -6
  43. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +11 -4
  44. data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +1 -0
  45. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -0
  46. data/match/lib/match/runner.rb +5 -5
  47. data/match/lib/match/storage/.git_storage.rb.swp +0 -0
  48. data/match/lib/match/storage/.interface.rb.swp +0 -0
  49. data/pilot/lib/pilot/build_manager.rb +14 -4
  50. data/pilot/lib/pilot/manager.rb +3 -1
  51. data/pilot/lib/pilot/options.rb +20 -1
  52. data/produce/lib/produce/commands_generator.rb +28 -0
  53. data/produce/lib/produce/service.rb +16 -1
  54. data/scan/lib/scan/xcpretty_reporter_options_generator.rb +1 -1
  55. data/sigh/lib/sigh/options.rb +2 -1
  56. data/spaceship/lib/spaceship/client.rb +6 -0
  57. data/spaceship/lib/spaceship/connect_api/api_client.rb +15 -1
  58. data/spaceship/lib/spaceship/connect_api/models/app.rb +9 -1
  59. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  60. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  61. data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
  62. data/spaceship/lib/spaceship/connect_api/models/user.rb +17 -3
  63. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +26 -5
  64. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +5 -0
  65. data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
  66. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +3 -0
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +46 -5
  68. data/spaceship/lib/spaceship/connect_api/token.rb +4 -1
  69. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +3 -0
  70. data/spaceship/lib/spaceship/connect_api/users/client.rb +3 -0
  71. data/spaceship/lib/spaceship/connect_api/users/users.rb +58 -3
  72. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  73. data/spaceship/lib/spaceship/tunes/tunes_client.rb +3 -0
  74. data/supply/lib/supply/client.rb +38 -5
  75. data/supply/lib/supply/options.rb +7 -0
  76. data/supply/lib/supply/uploader.rb +1 -1
  77. metadata +39 -19
@@ -11,6 +11,9 @@ module Spaceship
11
11
 
12
12
  super(cookie: cookie, current_team_id: current_team_id, token: token, another_client: another_client)
13
13
 
14
+ # Used by most iris requests starting in July 2021
15
+ @additional_headers = { 'x-csrf-itc': '[asc-ui]' } if another_client
16
+
14
17
  self.extend(Spaceship::ConnectAPI::Tunes::API)
15
18
  self.tunes_request_client = self
16
19
  end
@@ -11,6 +11,9 @@ module Spaceship
11
11
 
12
12
  super(cookie: cookie, current_team_id: current_team_id, token: token, another_client: another_client)
13
13
 
14
+ # Used by most iris requests starting in July 2021
15
+ @additional_headers = { 'x-csrf-itc': '[asc-ui]' } if another_client
16
+
14
17
  self.extend(Spaceship::ConnectAPI::Users::API)
15
18
  self.users_request_client = self
16
19
  end
@@ -28,8 +28,13 @@ module Spaceship
28
28
  users_request_client.delete("users/#{user_id}")
29
29
  end
30
30
 
31
- # Change app permissions for user
31
+ # Add app permissions for user
32
+ # @deprecated Use {#post_user_visible_apps} instead.
32
33
  def add_user_visible_apps(user_id: nil, app_ids: nil)
34
+ post_user_visible_apps(user_id: user_id, app_ids: app_ids)
35
+ end
36
+
37
+ def post_user_visible_apps(user_id: nil, app_ids: nil)
33
38
  body = {
34
39
  data: app_ids.map do |app_id|
35
40
  {
@@ -42,18 +47,52 @@ module Spaceship
42
47
  users_request_client.post("users/#{user_id}/relationships/visibleApps", body)
43
48
  end
44
49
 
50
+ # Replace app permissions for user
51
+ def patch_user_visible_apps(user_id: nil, app_ids: nil)
52
+ body = {
53
+ data: app_ids.map do |app_id|
54
+ {
55
+ type: "apps",
56
+ id: app_id
57
+ }
58
+ end
59
+ }
60
+
61
+ users_request_client.patch("users/#{user_id}/relationships/visibleApps", body)
62
+ end
63
+
64
+ # Remove app permissions for user
65
+ def delete_user_visible_apps(user_id: nil, app_ids: nil)
66
+ body = {
67
+ data: app_ids.map do |app_id|
68
+ {
69
+ type: "apps",
70
+ id: app_id
71
+ }
72
+ end
73
+ }
74
+ params = nil
75
+ users_request_client.delete("users/#{user_id}/relationships/visibleApps", params, body)
76
+ end
77
+
78
+ # Get app permissions for user
79
+ def get_user_visible_apps(user_id: id, limit: nil)
80
+ params = users_request_client.build_params(filter: {}, includes: nil, limit: limit, sort: nil)
81
+ users_request_client.get("users/#{user_id}/visibleApps", params)
82
+ end
83
+
45
84
  #
46
85
  # invitations (invited users)
47
86
  #
48
87
 
49
- # Get all invited users (not yet accepted)
88
+ # Get all invited users
50
89
  def get_user_invitations(filter: {}, includes: nil, limit: nil, sort: nil)
51
90
  params = users_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
52
91
  users_request_client.get("userInvitations", params)
53
92
  end
54
93
 
55
94
  # Invite new users to App Store Connect
56
- def post_user_invitation(email: nil, first_name: nil, last_name: nil, roles: [], provisioning_allowed: nil, all_apps_visible: nil)
95
+ def post_user_invitation(email: nil, first_name: nil, last_name: nil, roles: [], provisioning_allowed: nil, all_apps_visible: nil, visible_app_ids: [])
57
96
  body = {
58
97
  data: {
59
98
  type: "userInvitations",
@@ -64,6 +103,16 @@ module Spaceship
64
103
  roles: roles,
65
104
  provisioningAllowed: provisioning_allowed,
66
105
  allAppsVisible: all_apps_visible
106
+ },
107
+ relationships: {
108
+ visibleApps: {
109
+ data: visible_app_ids.map do |id|
110
+ {
111
+ id: id,
112
+ type: "apps"
113
+ }
114
+ end
115
+ }
67
116
  }
68
117
  }
69
118
  }
@@ -74,6 +123,12 @@ module Spaceship
74
123
  def delete_user_invitation(user_invitation_id: nil)
75
124
  users_request_client.delete("userInvitations/#{user_invitation_id}")
76
125
  end
126
+
127
+ # Get all app permissions for invited user
128
+ def get_user_invitation_visible_apps(user_invitation_id: id, limit: nil)
129
+ params = users_request_client.build_params(filter: {}, includes: nil, limit: limit, sort: nil)
130
+ users_request_client.get("userInvitations/#{user_invitation_id}/visibleApps", params)
131
+ end
77
132
  end
78
133
  end
79
134
  end
@@ -10,6 +10,7 @@ require 'spaceship/connect_api/tunes/tunes'
10
10
 
11
11
  require 'spaceship/connect_api/models/bundle_id_capability'
12
12
  require 'spaceship/connect_api/models/bundle_id'
13
+ require 'spaceship/connect_api/models/capabilities'
13
14
  require 'spaceship/connect_api/models/certificate'
14
15
  require 'spaceship/connect_api/models/device'
15
16
  require 'spaceship/connect_api/models/profile'
@@ -24,6 +24,9 @@ module Spaceship
24
24
  super
25
25
 
26
26
  @du_client = DUClient.new
27
+
28
+ # Used by most WebObjects requests starting in July 2021
29
+ @additional_headers = { 'x-csrf-itc': 'itc' }
27
30
  end
28
31
 
29
32
  class << self
@@ -163,11 +163,44 @@ module Supply
163
163
  ensure_active_edit!
164
164
 
165
165
  call_google_api do
166
- client.commit_edit(
167
- current_package_name,
168
- current_edit.id,
169
- changes_not_sent_for_review: Supply.config[:changes_not_sent_for_review]
170
- )
166
+ begin
167
+ client.commit_edit(
168
+ current_package_name,
169
+ current_edit.id,
170
+ changes_not_sent_for_review: Supply.config[:changes_not_sent_for_review]
171
+ )
172
+ rescue Google::Apis::ClientError => e
173
+ unless Supply.config[:rescue_changes_not_sent_for_review]
174
+ raise
175
+ end
176
+
177
+ error = begin
178
+ JSON.parse(e.body)
179
+ rescue
180
+ nil
181
+ end
182
+
183
+ if error
184
+ message = error["error"] && error["error"]["message"]
185
+ else
186
+ message = e.body
187
+ end
188
+
189
+ if message.include?("The query parameter changesNotSentForReview must not be set")
190
+ client.commit_edit(
191
+ current_package_name,
192
+ current_edit.id
193
+ )
194
+ elsif message.include?("Please set the query parameter changesNotSentForReview to true")
195
+ client.commit_edit(
196
+ current_package_name,
197
+ current_edit.id,
198
+ changes_not_sent_for_review: true
199
+ )
200
+ else
201
+ raise
202
+ end
203
+ end
171
204
  end
172
205
 
173
206
  self.current_edit = nil
@@ -1,3 +1,5 @@
1
+ # rubocop:disable Metrics/ClassLength
2
+
1
3
  require 'fastlane_core/configuration/config_item'
2
4
  require 'credentials_manager/appfile_config'
3
5
 
@@ -286,6 +288,11 @@ module Supply
286
288
  description: "Indicates that the changes in this edit will not be reviewed until they are explicitly sent for review from the Google Play Console UI",
287
289
  type: Boolean,
288
290
  default_value: false),
291
+ FastlaneCore::ConfigItem.new(key: :rescue_changes_not_sent_for_review,
292
+ env_name: "SUPPLY_RESCUE_CHANGES_NOT_SENT_FOR_REVIEW",
293
+ description: "Catches changes_not_sent_for_review errors when an edit is committed and retries with the configuration that the error message recommended",
294
+ type: Boolean,
295
+ default_value: true),
289
296
  FastlaneCore::ConfigItem.new(key: :in_app_update_priority,
290
297
  env_name: "SUPPLY_IN_APP_UPDATE_PRIORITY",
291
298
  optional: true,
@@ -302,7 +302,7 @@ module Supply
302
302
 
303
303
  def upload_mapping(apk_version_codes)
304
304
  mapping_paths = [Supply.config[:mapping]] unless (mapping_paths = Supply.config[:mapping_paths])
305
- mapping_paths.zip(apk_version_codes).each do |mapping_path, version_code|
305
+ mapping_paths.product(apk_version_codes).each do |mapping_path, version_code|
306
306
  if mapping_path
307
307
  UI.message("Preparing mapping at path '#{mapping_path}', version code #{version_code} for upload...")
308
308
  client.upload_mapping(mapping_path, version_code)
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.189.0
4
+ version: 2.193.0
5
5
  platform: ruby
6
6
  authors:
7
- - Jan Piotrowski
8
- - Aaron Brager
9
- - Iulian Onofrei
10
- - Satoshi Namai
11
- - Andrew McBurney
12
- - Max Ott
13
7
  - Jimmy Dee
8
+ - Aaron Brager
9
+ - Fumiya Nakamura
10
+ - Manish Rathi
11
+ - Olivier Halligon
14
12
  - Josh Holtz
15
- - Daniel Jankowski
13
+ - Andrew McBurney
16
14
  - Danielle Tomlinson
17
- - Joshua Liebowitz
18
- - Matthew Ellis
19
- - Manu Wallner
20
- - Kohki Miki
21
15
  - Jorge Revuelta H
22
- - Olivier Halligon
23
- - Manish Rathi
24
16
  - Luka Mirosevic
25
- - Felix Krause
26
- - Maksym Grebenets
17
+ - Iulian Onofrei
18
+ - Matthew Ellis
27
19
  - Helmut Januschka
20
+ - Jan Piotrowski
21
+ - Daniel Jankowski
22
+ - Joshua Liebowitz
23
+ - Manu Wallner
28
24
  - Jérôme Lacoste
25
+ - Max Ott
26
+ - Felix Krause
29
27
  - Stefan Natchev
28
+ - Satoshi Namai
29
+ - Maksym Grebenets
30
+ - Kohki Miki
30
31
  - Roger Oba
31
- - Fumiya Nakamura
32
32
  autorequire:
33
33
  bindir: bin
34
34
  cert_chain: []
35
- date: 2021-07-28 00:00:00.000000000 Z
35
+ date: 2021-08-31 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: xcodeproj
@@ -196,6 +196,20 @@ dependencies:
196
196
  - - "~>"
197
197
  - !ruby/object:Gem::Version
198
198
  version: 1.0.0
199
+ - !ruby/object:Gem::Dependency
200
+ name: optparse
201
+ requirement: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - "~>"
204
+ - !ruby/object:Gem::Version
205
+ version: 0.1.1
206
+ type: :runtime
207
+ prerelease: false
208
+ version_requirements: !ruby/object:Gem::Requirement
209
+ requirements:
210
+ - - "~>"
211
+ - !ruby/object:Gem::Version
212
+ version: 0.1.1
199
213
  - !ruby/object:Gem::Dependency
200
214
  name: tty-screen
201
215
  requirement: !ruby/object:Gem::Requirement
@@ -971,8 +985,10 @@ files:
971
985
  - deliver/lib/deliver/module.rb
972
986
  - deliver/lib/deliver/options.rb
973
987
  - deliver/lib/deliver/runner.rb
988
+ - deliver/lib/deliver/screenshot_comparable.rb
974
989
  - deliver/lib/deliver/setup.rb
975
990
  - deliver/lib/deliver/submit_for_review.rb
991
+ - deliver/lib/deliver/sync_screenshots.rb
976
992
  - deliver/lib/deliver/upload_metadata.rb
977
993
  - deliver/lib/deliver/upload_price_tier.rb
978
994
  - deliver/lib/deliver/upload_screenshots.rb
@@ -1493,6 +1509,8 @@ files:
1493
1509
  - match/lib/match/setup.rb
1494
1510
  - match/lib/match/spaceship_ensure.rb
1495
1511
  - match/lib/match/storage.rb
1512
+ - match/lib/match/storage/.git_storage.rb.swp
1513
+ - match/lib/match/storage/.interface.rb.swp
1496
1514
  - match/lib/match/storage/git_storage.rb
1497
1515
  - match/lib/match/storage/google_cloud_storage.rb
1498
1516
  - match/lib/match/storage/interface.rb
@@ -1680,6 +1698,7 @@ files:
1680
1698
  - spaceship/lib/spaceship/connect_api/models/build_delivery.rb
1681
1699
  - spaceship/lib/spaceship/connect_api/models/bundle_id.rb
1682
1700
  - spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb
1701
+ - spaceship/lib/spaceship/connect_api/models/capabilities.rb
1683
1702
  - spaceship/lib/spaceship/connect_api/models/certificate.rb
1684
1703
  - spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
1685
1704
  - spaceship/lib/spaceship/connect_api/models/custom_app_user.rb
@@ -1696,6 +1715,7 @@ files:
1696
1715
  - spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb
1697
1716
  - spaceship/lib/spaceship/connect_api/response.rb
1698
1717
  - spaceship/lib/spaceship/connect_api/spaceship.rb
1718
+ - spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp
1699
1719
  - spaceship/lib/spaceship/connect_api/testflight/client.rb
1700
1720
  - spaceship/lib/spaceship/connect_api/testflight/testflight.rb
1701
1721
  - spaceship/lib/spaceship/connect_api/token.rb
@@ -1856,7 +1876,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1856
1876
  - !ruby/object:Gem::Version
1857
1877
  version: '0'
1858
1878
  requirements: []
1859
- rubygems_version: 3.1.6
1879
+ rubygems_version: 3.1.4
1860
1880
  signing_key:
1861
1881
  specification_version: 4
1862
1882
  summary: The easiest way to automate beta deployments and releases for your iOS and