fastlane 2.206.2 → 2.209.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +102 -102
  3. data/deliver/lib/deliver/options.rb +1 -2
  4. data/deliver/lib/deliver/runner.rb +31 -35
  5. data/deliver/lib/deliver/upload_price_tier.rb +3 -1
  6. data/deliver/lib/deliver/upload_screenshots.rb +1 -1
  7. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
  8. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  9. data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
  10. data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
  11. data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
  12. data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/xcodebuild.rb +8 -2
  14. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
  15. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
  16. data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
  17. data/fastlane/lib/fastlane/version.rb +1 -1
  18. data/fastlane/swift/Deliverfile.swift +1 -1
  19. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  20. data/fastlane/swift/Fastlane.swift +31 -11
  21. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/joshholtz.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  22. data/fastlane/swift/Gymfile.swift +1 -1
  23. data/fastlane/swift/GymfileProtocol.swift +1 -1
  24. data/fastlane/swift/Matchfile.swift +1 -1
  25. data/fastlane/swift/MatchfileProtocol.swift +5 -1
  26. data/fastlane/swift/Precheckfile.swift +1 -1
  27. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  28. data/fastlane/swift/Scanfile.swift +1 -1
  29. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  30. data/fastlane/swift/Screengrabfile.swift +1 -1
  31. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  32. data/fastlane/swift/Snapshotfile.swift +1 -1
  33. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  34. data/fastlane/swift/SocketClient.swift +1 -1
  35. data/fastlane/swift/formatting/Brewfile.lock.json +21 -16
  36. data/fastlane_core/lib/fastlane_core/cert_checker.rb +11 -12
  37. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
  38. data/fastlane_core/lib/fastlane_core/project.rb +19 -2
  39. data/frameit/lib/frameit/device_types.rb +2 -0
  40. data/frameit/lib/frameit/frame_downloader.rb +1 -1
  41. data/match/lib/match/encryption.rb +3 -0
  42. data/match/lib/match/importer.rb +1 -0
  43. data/match/lib/match/module.rb +53 -1
  44. data/match/lib/match/nuke.rb +3 -40
  45. data/match/lib/match/options.rb +6 -0
  46. data/match/lib/match/runner.rb +11 -1
  47. data/match/lib/match/setup.rb +1 -1
  48. data/match/lib/match/spaceship_ensure.rb +4 -2
  49. data/match/lib/match/storage/gitlab/client.rb +102 -0
  50. data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
  51. data/match/lib/match/storage/gitlab_secure_files.rb +182 -0
  52. data/match/lib/match/storage.rb +4 -0
  53. data/match/lib/match/table_printer.rb +2 -1
  54. data/match/lib/match/utils.rb +15 -2
  55. data/pilot/lib/pilot/build_manager.rb +2 -2
  56. data/scan/lib/scan/detect_values.rb +6 -0
  57. data/sigh/lib/sigh/download_all.rb +14 -2
  58. data/sigh/lib/sigh/module.rb +3 -1
  59. data/sigh/lib/sigh/runner.rb +7 -0
  60. data/snapshot/lib/snapshot/options.rb +1 -1
  61. data/snapshot/lib/snapshot/reports_generator.rb +1 -0
  62. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +4 -1
  63. data/spaceship/lib/spaceship/connect_api/models/app.rb +4 -2
  64. data/spaceship/lib/spaceship/connect_api/models/profile.rb +4 -0
  65. data/spaceship/lib/spaceship/connect_api/response.rb +10 -6
  66. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +18 -8
  67. data/spaceship/lib/spaceship/tunes/tunes_client.rb +63 -2
  68. data/trainer/lib/trainer/junit_generator.rb +1 -1
  69. metadata +23 -22
  70. data/spaceship/lib/spaceship/connect_api/.response.rb.swp +0 -0
  71. data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
@@ -24,7 +24,9 @@ module Sigh
24
24
  Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC
25
25
  "AdHoc"
26
26
  when Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE,
27
- Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE
27
+ Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE,
28
+ Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE,
29
+ Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE
28
30
  "InHouse"
29
31
  when Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT,
30
32
  Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT
@@ -82,10 +82,12 @@ module Sigh
82
82
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT if Sigh.config[:development]
83
83
  when "macos"
84
84
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE
85
+ @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
85
86
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT if Sigh.config[:development]
86
87
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT if Sigh.config[:developer_id]
87
88
  when "catalyst"
88
89
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE
90
+ @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
89
91
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT if Sigh.config[:development]
90
92
  @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT if Sigh.config[:developer_id]
91
93
  end
@@ -254,6 +256,11 @@ module Sigh
254
256
  Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION,
255
257
  Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION_G2
256
258
  ]
259
+ elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE
260
+ # Enterprise accounts don't have access to Apple Distribution certificates
261
+ types = [
262
+ Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DISTRIBUTION
263
+ ]
257
264
  else
258
265
  types = [
259
266
  Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION,
@@ -133,7 +133,7 @@ module Snapshot
133
133
  is_string: false),
134
134
  FastlaneCore::ConfigItem.new(key: :override_status_bar_arguments,
135
135
  env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR_ARGUMENTS',
136
- description: "Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`",
136
+ description: "Fully customize the status bar by setting each option here. Requires `override_status_bar` to be set to `true`. See `xcrun simctl status_bar --help`",
137
137
  optional: true,
138
138
  type: String),
139
139
  FastlaneCore::ConfigItem.new(key: :localize_simulator,
@@ -132,6 +132,7 @@ module Snapshot
132
132
  'iPad Pro (12.9-inch)' => 'iPad Pro (12.9-inch)',
133
133
  'iPad Pro (12.9 inch)' => 'iPad Pro (12.9-inch)', # iOS 10.3.1 simulator
134
134
  'iPad Pro' => 'iPad Pro (12.9-inch)', # iOS 9.3 simulator
135
+ 'iPod touch (7th generation)' => 'iPod touch (7th generation)',
135
136
  'Apple TV 1080p' => 'Apple TV',
136
137
  'Apple TV 4K (at 1080p)' => 'Apple TV 4K (at 1080p)',
137
138
  'Apple TV 4K' => 'Apple TV 4K',
@@ -135,7 +135,10 @@ module Snapshot
135
135
  if arguments.nil? || arguments.empty?
136
136
  # The time needs to be passed as ISO8601 so the simulator formats it correctly
137
137
  time = Time.new(2007, 1, 9, 9, 41, 0)
138
- arguments = "--time #{time.iso8601} --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100"
138
+
139
+ # If you don't override the operator name, you'll get "Carrier" in the status bar on no-notch devices such as iPhone 8. Pass an empty string to blank it out.
140
+
141
+ arguments = "--time #{time.iso8601} --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --operatorName '' --cellularBars 4 --batteryState charged --batteryLevel 100"
139
142
  end
140
143
 
141
144
  Helper.backticks("xcrun simctl status_bar #{device_udid} override #{arguments} &> /dev/null")
@@ -101,10 +101,12 @@ module Spaceship
101
101
  return client.get_app(app_id: app_id, includes: includes).first
102
102
  end
103
103
 
104
- def update(client: nil, attributes: nil, app_price_tier_id: nil, territory_ids: nil)
104
+ # Updates app attributes, price tier and availability of an app in territories
105
+ # Check Tunes patch_app method for explanation how to use territory_ids parameter with allow_removing_from_sale to remove app from sale
106
+ def update(client: nil, attributes: nil, app_price_tier_id: nil, territory_ids: nil, allow_removing_from_sale: false)
105
107
  client ||= Spaceship::ConnectAPI
106
108
  attributes = reverse_attr_mapping(attributes)
107
- return client.patch_app(app_id: id, attributes: attributes, app_price_tier_id: app_price_tier_id, territory_ids: territory_ids)
109
+ return client.patch_app(app_id: id, attributes: attributes, app_price_tier_id: app_price_tier_id, territory_ids: territory_ids, allow_removing_from_sale: allow_removing_from_sale)
108
110
  end
109
111
 
110
112
  #
@@ -51,6 +51,10 @@ module Spaceship
51
51
  MAC_CATALYST_APP_DEVELOPMENT = "MAC_CATALYST_APP_DEVELOPMENT"
52
52
  MAC_CATALYST_APP_STORE = "MAC_CATALYST_APP_STORE"
53
53
  MAC_CATALYST_APP_DIRECT = "MAC_CATALYST_APP_DIRECT"
54
+
55
+ # As of 2022-06-25, only available with Apple ID auth
56
+ MAC_APP_INHOUSE = "MAC_APP_INHOUSE"
57
+ MAC_CATALYST_APP_INHOUSE = "MAC_CATALYST_APP_INHOUSE"
54
58
  end
55
59
 
56
60
  def self.type
@@ -22,13 +22,17 @@ module Spaceship
22
22
  return links["next"]
23
23
  end
24
24
 
25
- def next_page
25
+ def next_page(&block)
26
26
  url = next_url
27
27
  return nil if url.nil?
28
- return client.get(url)
28
+ if block_given?
29
+ return yield(url)
30
+ else
31
+ return client.get(url)
32
+ end
29
33
  end
30
34
 
31
- def next_pages(count: 1)
35
+ def next_pages(count: 1, &block)
32
36
  if !count.nil? && count < 0
33
37
  count = 0
34
38
  end
@@ -38,7 +42,7 @@ module Spaceship
38
42
 
39
43
  resp = self
40
44
  loop do
41
- resp = resp.next_page
45
+ resp = resp.next_page(&block)
42
46
  break if resp.nil?
43
47
  responses << resp
44
48
  counter += 1
@@ -49,8 +53,8 @@ module Spaceship
49
53
  return responses
50
54
  end
51
55
 
52
- def all_pages
53
- return next_pages(count: nil)
56
+ def all_pages(&block)
57
+ return next_pages(count: nil, &block)
54
58
  end
55
59
 
56
60
  def to_models
@@ -134,7 +134,15 @@ module Spaceship
134
134
  tunes_request_client.post("apps", body)
135
135
  end
136
136
 
137
- def patch_app(app_id: nil, attributes: {}, app_price_tier_id: nil, territory_ids: nil)
137
+ # Updates app attributes, price tier, visibility in regions or countries.
138
+ # Use territory_ids with allow_removing_from_sale to remove app from sale
139
+ # @param territory_ids updates app visibility in regions or countries.
140
+ # Possible values:
141
+ # empty array will remove app from sale if allow_removing_from_sale is true,
142
+ # array with territory ids will set availability to territories with those ids,
143
+ # nil will leave app availability on AppStore as is
144
+ # @param allow_removing_from_sale allows for removing app from sale when territory_ids is an empty array
145
+ def patch_app(app_id: nil, attributes: {}, app_price_tier_id: nil, territory_ids: nil, allow_removing_from_sale: false)
138
146
  relationships = {}
139
147
  included = []
140
148
 
@@ -173,13 +181,15 @@ module Spaceship
173
181
  end
174
182
 
175
183
  # Territories
176
- territories_data = (territory_ids || []).map do |id|
177
- { type: "territories", id: id }
178
- end
179
- unless territories_data.empty?
180
- relationships[:availableTerritories] = {
181
- data: territories_data
182
- }
184
+ unless territory_ids.nil?
185
+ territories_data = territory_ids.map do |id|
186
+ { type: "territories", id: id }
187
+ end
188
+ if !territories_data.empty? || allow_removing_from_sale
189
+ relationships[:availableTerritories] = {
190
+ data: territories_data
191
+ }
192
+ end
183
193
  end
184
194
 
185
195
  # Data
@@ -9,6 +9,7 @@ require_relative 'errors'
9
9
  require_relative 'iap_subscription_pricing_tier'
10
10
  require_relative 'pricing_tier'
11
11
  require_relative 'territory'
12
+ require_relative '../connect_api/response'
12
13
  module Spaceship
13
14
  # rubocop:disable Metrics/ClassLength
14
15
  class TunesClient < Spaceship::Client
@@ -254,8 +255,68 @@ module Spaceship
254
255
  #####################################################
255
256
 
256
257
  def applications
257
- r = request(:get, 'ra/apps/manageyourapps/summary/v2')
258
- parse_response(r, 'data')['summaries']
258
+ # Doing this real bad puts for now until a more formal deprecation logic can get made
259
+ puts("Spaceship::Tunes::Application.all is deprecated")
260
+ puts(" It's using a temporary patch to keep it from raising an error but things may not work correctly")
261
+ puts(" Please consider switching to Spaceship::ConnectAPI if you can")
262
+ puts(" For more details - https://github.com/fastlane/fastlane/pull/20480")
263
+
264
+ # This legacy endpoint went offline around July 7th, 2022. This is a rough attempt
265
+ # at retrofitting using the newer App Store Connect API endpoints
266
+ #
267
+ # This could all be done easily with Spaceship::ConnectAPI::App.find but there were a lot of
268
+ # circular dependency issues that were very difficult to solve because. Spaceship::Tunes would be
269
+ # using Spaceship::ConnectAPI which uses Spaceship::Tunes
270
+ #
271
+ # However, using Spaceship::ConnectAPI::Response works. This will fetch multiple pages of app
272
+ # if it needs to
273
+ #
274
+ # https://github.com/fastlane/fastlane/pull/20480
275
+ r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices")
276
+ response = Spaceship::ConnectAPI::Response.new(
277
+ body: r.body,
278
+ status: r.status,
279
+ headers: r.headers,
280
+ client: nil
281
+ )
282
+
283
+ apps = response.all_pages do |url|
284
+ r = request(:get, url)
285
+ Spaceship::ConnectAPI::Response.new(
286
+ body: r.body,
287
+ status: r.status,
288
+ headers: r.headers,
289
+ client: nil
290
+ )
291
+ end.flat_map(&:to_models)
292
+
293
+ apps.map do |asc_app|
294
+ platforms = (asc_app.app_store_versions || []).map(&:platform).uniq.map do |asc_platform|
295
+ case asc_platform
296
+ when "TV_OS"
297
+ "appletvos"
298
+ when "MAC_OS"
299
+ "osx"
300
+ when "IOS"
301
+ "ios"
302
+ else
303
+ raise "Cannot find a matching platform for '#{asc_platform}'}"
304
+ end
305
+ end
306
+
307
+ {
308
+ 'adamId' => asc_app.id,
309
+ 'name' => asc_app.name,
310
+ 'vendorId' => "",
311
+ 'bundleId' => asc_app.bundle_id,
312
+ 'lastModifiedDate' => nil,
313
+ 'issuesCount' => nil,
314
+ 'iconUrl' => nil,
315
+ 'versionSets' => platforms.map do |platform|
316
+ { 'type' => 'app', 'platformString' => platform }
317
+ end
318
+ }
319
+ end
259
320
  end
260
321
 
261
322
  def app_details(app_id)
@@ -15,7 +15,7 @@ module Trainer
15
15
 
16
16
  lib_path = Trainer::ROOT
17
17
  xml_path = File.join(lib_path, "lib/assets/junit.xml.erb")
18
- xml = ERB.new(File.read(xml_path), nil, '<>').result(binding) # http://www.rrn.dk/rubys-erb-templating-system
18
+ xml = ERB.new(File.read(xml_path), trim_mode: '<>').result(binding) # http://www.rrn.dk/rubys-erb-templating-system
19
19
 
20
20
  xml = xml.gsub('system_', 'system-').delete("\e") # Jenkins can not parse 'ESC' symbol
21
21
 
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.206.2
4
+ version: 2.209.0
5
5
  platform: ruby
6
6
  authors:
7
- - Łukasz Grabowski
7
+ - Maksym Grebenets
8
+ - Aaron Brager
9
+ - Jorge Revuelta H
8
10
  - Jérôme Lacoste
9
11
  - Iulian Onofrei
10
- - Manu Wallner
11
- - Daniel Jankowski
12
- - Jan Piotrowski
13
- - Jorge Revuelta H
14
- - Felix Krause
15
- - Luka Mirosevic
16
12
  - Kohki Miki
17
- - Joshua Liebowitz
13
+ - Roger Oba
14
+ - Jan Piotrowski
18
15
  - Danielle Tomlinson
19
16
  - Satoshi Namai
17
+ - Manish Rathi
18
+ - Luka Mirosevic
19
+ - Helmut Januschka
20
+ - Joshua Liebowitz
21
+ - Daniel Jankowski
22
+ - Jimmy Dee
20
23
  - Max Ott
21
24
  - Josh Holtz
25
+ - Manu Wallner
26
+ - Andrew McBurney
27
+ - Łukasz Grabowski
28
+ - Stefan Natchev
29
+ - Felix Krause
22
30
  - Olivier Halligon
23
- - Matthew Ellis
24
- - Aaron Brager
25
- - Maksym Grebenets
26
31
  - Fumiya Nakamura
27
- - Jimmy Dee
28
- - Roger Oba
29
- - Manish Rathi
30
- - Helmut Januschka
31
- - Stefan Natchev
32
- - Andrew McBurney
32
+ - Matthew Ellis
33
33
  autorequire:
34
34
  bindir: bin
35
35
  cert_chain: []
36
- date: 2022-05-25 00:00:00.000000000 Z
36
+ date: 2022-08-11 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: xcodeproj
@@ -1517,6 +1517,9 @@ files:
1517
1517
  - match/lib/match/spaceship_ensure.rb
1518
1518
  - match/lib/match/storage.rb
1519
1519
  - match/lib/match/storage/git_storage.rb
1520
+ - match/lib/match/storage/gitlab/client.rb
1521
+ - match/lib/match/storage/gitlab/secure_file.rb
1522
+ - match/lib/match/storage/gitlab_secure_files.rb
1520
1523
  - match/lib/match/storage/google_cloud_storage.rb
1521
1524
  - match/lib/match/storage/interface.rb
1522
1525
  - match/lib/match/storage/s3_storage.rb
@@ -1659,12 +1662,10 @@ files:
1659
1662
  - spaceship/lib/spaceship/client.rb
1660
1663
  - spaceship/lib/spaceship/commands_generator.rb
1661
1664
  - spaceship/lib/spaceship/connect_api.rb
1662
- - spaceship/lib/spaceship/connect_api/.response.rb.swp
1663
1665
  - spaceship/lib/spaceship/connect_api/api_client.rb
1664
1666
  - spaceship/lib/spaceship/connect_api/client.rb
1665
1667
  - spaceship/lib/spaceship/connect_api/file_uploader.rb
1666
1668
  - spaceship/lib/spaceship/connect_api/model.rb
1667
- - spaceship/lib/spaceship/connect_api/models/.app.rb.swp
1668
1669
  - spaceship/lib/spaceship/connect_api/models/.review_submission.rb.swp
1669
1670
  - spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb
1670
1671
  - spaceship/lib/spaceship/connect_api/models/app.rb
@@ -1893,7 +1894,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1893
1894
  requirements:
1894
1895
  - - ">="
1895
1896
  - !ruby/object:Gem::Version
1896
- version: '2.5'
1897
+ version: '2.6'
1897
1898
  required_rubygems_version: !ruby/object:Gem::Requirement
1898
1899
  requirements:
1899
1900
  - - ">="