fastlane 2.191.0 → 2.192.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +92 -92
  3. data/fastlane/lib/assets/completions/completion.bash +4 -1
  4. data/fastlane/lib/assets/completions/completion.zsh +6 -5
  5. data/fastlane/lib/fastlane/actions/create_xcframework.rb +97 -17
  6. data/fastlane/lib/fastlane/actions/notarize.rb +77 -1
  7. data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
  8. data/fastlane/lib/fastlane/actions/zip.rb +3 -3
  9. data/fastlane/lib/fastlane/version.rb +1 -1
  10. data/fastlane/swift/Deliverfile.swift +1 -1
  11. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  12. data/fastlane/swift/Fastlane.swift +48 -10
  13. data/fastlane/swift/Gymfile.swift +1 -1
  14. data/fastlane/swift/GymfileProtocol.swift +1 -1
  15. data/fastlane/swift/Matchfile.swift +1 -1
  16. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  17. data/fastlane/swift/Precheckfile.swift +1 -1
  18. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  19. data/fastlane/swift/Scanfile.swift +1 -1
  20. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  21. data/fastlane/swift/Screengrabfile.swift +1 -1
  22. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  23. data/fastlane/swift/Snapshotfile.swift +1 -1
  24. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  25. data/fastlane/swift/formatting/Brewfile.lock.json +6 -6
  26. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -0
  27. data/pilot/lib/pilot/build_manager.rb +0 -1
  28. data/produce/lib/produce/service.rb +1 -1
  29. data/spaceship/lib/spaceship/connect_api/api_client.rb +15 -1
  30. data/spaceship/lib/spaceship/connect_api/models/app.rb +2 -1
  31. data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
  32. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +7 -5
  33. data/spaceship/lib/spaceship/connect_api/token.rb +2 -0
  34. data/supply/lib/supply/client.rb +38 -5
  35. data/supply/lib/supply/options.rb +7 -0
  36. metadata +35 -20
@@ -558,7 +558,6 @@ module Pilot
558
558
  attributes[:autoNotifyEnabled] = info[:auto_notify_enabled] if info.key?(:auto_notify_enabled)
559
559
  build_beta_detail = build.build_beta_detail
560
560
 
561
- # https://github.com/fastlane/fastlane/pull/16006
562
561
  if build_beta_detail
563
562
  Spaceship::ConnectAPI.patch_build_beta_details(build_beta_details_id: build_beta_detail.id, attributes: attributes)
564
563
  else
@@ -97,7 +97,7 @@ module Produce
97
97
  bundle_id.update_capability(ACCESS_WIFI_INFORMATION, enabled: on)
98
98
  end
99
99
 
100
- if options.access_wifi
100
+ if options.app_attest
101
101
  UI.message("\tApp Attest")
102
102
  bundle_id.update_capability(APP_ATTEST, enabled: on)
103
103
  end
@@ -208,7 +208,13 @@ module Spaceship
208
208
  # Overridden from Spaceship::Client
209
209
  def handle_error(response)
210
210
  body = response.body.empty? ? {} : response.body
211
- body = JSON.parse(body) if body.kind_of?(String)
211
+
212
+ # Setting body nil if invalid JSON which can happen if 502
213
+ begin
214
+ body = JSON.parse(body) if body.kind_of?(String)
215
+ rescue
216
+ nil
217
+ end
212
218
 
213
219
  case response.status.to_i
214
220
  when 401
@@ -221,6 +227,14 @@ module Spaceship
221
227
  else
222
228
  raise AccessForbiddenError, format_errors(response)
223
229
  end
230
+ when 502
231
+ # Issue - https://github.com/fastlane/fastlane/issues/19264
232
+ # This 502 with "Could not process this request" body sometimes
233
+ # work and sometimes doesn't
234
+ # Usually retrying once or twice will solve the issue
235
+ if body && body.include?("Could not process this request")
236
+ raise BadGatewayError, "Could not process this request"
237
+ end
224
238
  end
225
239
  end
226
240
 
@@ -385,11 +385,12 @@ module Spaceship
385
385
  return resps.flat_map(&:to_models)
386
386
  end
387
387
 
388
- def create_beta_group(client: nil, group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
388
+ def create_beta_group(client: nil, group_name: nil, is_internal_group: false, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
389
389
  client ||= Spaceship::ConnectAPI
390
390
  resps = client.create_beta_group(
391
391
  app_id: id,
392
392
  group_name: group_name,
393
+ is_internal_group: is_internal_group,
393
394
  public_link_enabled: public_link_enabled,
394
395
  public_link_limit: public_link_limit,
395
396
  public_link_limit_enabled: public_link_limit_enabled
@@ -204,11 +204,13 @@ module Spaceship
204
204
  test_flight_request_client.delete("builds/#{build_id}/relationships/betaGroups", nil, body)
205
205
  end
206
206
 
207
- def create_beta_group(app_id: nil, group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
207
+ def create_beta_group(app_id: nil, group_name: nil, is_internal_group: false, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
208
208
  body = {
209
209
  data: {
210
210
  attributes: {
211
211
  name: group_name,
212
+ isInternalGroup: is_internal_group,
213
+ hasAccessToAllBuilds: is_internal_group ? true : false, # Undocumented of 2021-08-02 in ASC API docs and ASC Open API spec. This is the default behavior on App Store Connect and does work with both Apple ID and API Token
212
214
  publicLinkEnabled: public_link_enabled,
213
215
  publicLinkLimit: public_link_limit,
214
216
  publicLinkLimitEnabled: public_link_limit_enabled
@@ -218,11 +220,11 @@ module Spaceship
218
220
  data: {
219
221
  id: app_id,
220
222
  type: "apps"
221
- }
222
- }
223
+ },
224
+ },
223
225
  },
224
- type: "betaGroups"
225
- }
226
+ type: "betaGroups",
227
+ },
226
228
  }
227
229
  test_flight_request_client.post("betaGroups", body)
228
230
  end
@@ -21,6 +21,8 @@ module Spaceship
21
21
  attr_reader :duration
22
22
  attr_reader :expiration
23
23
 
24
+ attr_reader :key_raw
25
+
24
26
  # Temporary attribute not needed to create the JWT text
25
27
  # There is no way to determine if the team associated with this
26
28
  # key is for App Store or Enterprise so this is the temporary workaround
@@ -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,
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.191.0
4
+ version: 2.192.0
5
5
  platform: ruby
6
6
  authors:
7
- - Andrew McBurney
8
- - Fumiya Nakamura
7
+ - Jan Piotrowski
9
8
  - Manu Wallner
10
- - Jimmy Dee
9
+ - Jérôme Lacoste
10
+ - Helmut Januschka
11
+ - Daniel Jankowski
11
12
  - Satoshi Namai
13
+ - Joshua Liebowitz
14
+ - Roger Oba
12
15
  - Josh Holtz
13
- - Felix Krause
14
- - Jérôme Lacoste
15
- - Manish Rathi
16
- - Kohki Miki
17
- - Iulian Onofrei
18
16
  - Matthew Ellis
17
+ - Andrew McBurney
19
18
  - Aaron Brager
20
- - Danielle Tomlinson
19
+ - Stefan Natchev
20
+ - Manish Rathi
21
+ - Felix Krause
22
+ - Jorge Revuelta H
21
23
  - Max Ott
22
- - Roger Oba
23
- - Olivier Halligon
24
24
  - Maksym Grebenets
25
- - Jan Piotrowski
26
- - Jorge Revuelta H
25
+ - Iulian Onofrei
26
+ - Olivier Halligon
27
+ - Jimmy Dee
28
+ - Danielle Tomlinson
29
+ - Kohki Miki
30
+ - Fumiya Nakamura
27
31
  - Luka Mirosevic
28
- - Daniel Jankowski
29
- - Stefan Natchev
30
- - Helmut Januschka
31
- - Joshua Liebowitz
32
32
  autorequire:
33
33
  bindir: bin
34
34
  cert_chain: []
35
- date: 2021-08-06 00:00:00.000000000 Z
35
+ date: 2021-08-24 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
@@ -1699,6 +1713,7 @@ files:
1699
1713
  - spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb
1700
1714
  - spaceship/lib/spaceship/connect_api/response.rb
1701
1715
  - spaceship/lib/spaceship/connect_api/spaceship.rb
1716
+ - spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp
1702
1717
  - spaceship/lib/spaceship/connect_api/testflight/client.rb
1703
1718
  - spaceship/lib/spaceship/connect_api/testflight/testflight.rb
1704
1719
  - spaceship/lib/spaceship/connect_api/token.rb
@@ -1859,7 +1874,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1859
1874
  - !ruby/object:Gem::Version
1860
1875
  version: '0'
1861
1876
  requirements: []
1862
- rubygems_version: 3.1.6
1877
+ rubygems_version: 3.1.4
1863
1878
  signing_key:
1864
1879
  specification_version: 4
1865
1880
  summary: The easiest way to automate beta deployments and releases for your iOS and