fastlane 2.154.0 → 2.156.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -74
  3. data/deliver/lib/deliver/app_screenshot_iterator.rb +98 -0
  4. data/deliver/lib/deliver/html_generator.rb +8 -1
  5. data/deliver/lib/deliver/queue_worker.rb +64 -0
  6. data/deliver/lib/deliver/upload_screenshots.rb +122 -125
  7. data/fastlane/lib/fastlane/actions/create_keychain.rb +5 -1
  8. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +5 -0
  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 +375 -182
  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 +6 -2
  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 +5 -1
  25. data/fastlane_core/lib/fastlane_core/project.rb +1 -0
  26. data/gym/lib/gym/detect_values.rb +6 -3
  27. data/gym/lib/gym/generators/build_command_generator.rb +0 -1
  28. data/gym/lib/gym/module.rb +22 -0
  29. data/gym/lib/gym/runner.rb +8 -10
  30. data/match/lib/match/generator.rb +6 -0
  31. data/match/lib/match/options.rb +7 -2
  32. data/match/lib/match/runner.rb +12 -5
  33. data/match/lib/match/spaceship_ensure.rb +7 -9
  34. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  35. data/scan/lib/scan/test_command_generator.rb +3 -1
  36. data/screengrab/lib/screengrab/runner.rb +7 -7
  37. data/sigh/lib/sigh/download_all.rb +42 -27
  38. data/sigh/lib/sigh/module.rb +26 -0
  39. data/sigh/lib/sigh/options.rb +2 -2
  40. data/sigh/lib/sigh/runner.rb +100 -35
  41. data/snapshot/lib/snapshot/options.rb +5 -0
  42. data/snapshot/lib/snapshot/test_command_generator.rb +3 -2
  43. data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
  44. data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +4 -1
  45. data/spaceship/lib/spaceship/.client.rb.swp +0 -0
  46. data/spaceship/lib/spaceship/.spaceauth_runner.rb.swp +0 -0
  47. data/spaceship/lib/spaceship/.two_step_or_factor_client.rb.swp +0 -0
  48. data/spaceship/lib/spaceship/connect_api/client.rb +2 -0
  49. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  50. data/spaceship/lib/spaceship/connect_api/models/app.rb +3 -1
  51. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +17 -5
  52. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +41 -7
  53. data/spaceship/lib/spaceship/connect_api/models/profile.rb +32 -1
  54. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +46 -4
  55. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +41 -0
  56. data/supply/lib/supply/client.rb +2 -1
  57. data/supply/lib/supply/options.rb +8 -1
  58. metadata +24 -19
@@ -13,6 +13,9 @@ module Spaceship
13
13
  attr_accessor :profile_type
14
14
  attr_accessor :expiration_date
15
15
 
16
+ attr_accessor :bundle_id
17
+ attr_accessor :certificates
18
+
16
19
  attr_mapping({
17
20
  "name" => "name",
18
21
  "platform" => "platform",
@@ -21,7 +24,10 @@ module Spaceship
21
24
  "createdDate" => "created_date",
22
25
  "profileState" => "profile_state",
23
26
  "profileType" => "profile_type",
24
- "expirationDate" => "expiration_date"
27
+ "expirationDate" => "expiration_date",
28
+
29
+ "bundleId" => "bundle_id",
30
+ "certificates" => "certificates"
25
31
  })
26
32
 
27
33
  module ProfileState
@@ -41,12 +47,19 @@ module Spaceship
41
47
  TVOS_APP_STORE = "TVOS_APP_STORE"
42
48
  TVOS_APP_ADHOC = "TVOS_APP_ADHOC"
43
49
  TVOS_APP_INHOUSE = "TVOS_APP_INHOUSE"
50
+ MAC_CATALYST_APP_DEVELOPMENT = "MAC_CATALYST_APP_DEVELOPMENT"
51
+ MAC_CATALYST_APP_STORE = "MAC_CATALYST_APP_STORE"
52
+ MAC_CATALYST_APP_DIRECT = "MAC_CATALYST_APP_DIRECT"
44
53
  end
45
54
 
46
55
  def self.type
47
56
  return "profiles"
48
57
  end
49
58
 
59
+ def valid?
60
+ return profile_state == ProfileState::ACTIVE
61
+ end
62
+
50
63
  #
51
64
  # API
52
65
  #
@@ -55,6 +68,24 @@ module Spaceship
55
68
  resps = Spaceship::ConnectAPI.get_profiles(filter: filter, includes: includes).all_pages
56
69
  return resps.flat_map(&:to_models)
57
70
  end
71
+
72
+ def self.create(name: nil, profile_type: nil, bundle_id_id: nil, certificate_ids: nil, device_ids: nil, template_name: nil)
73
+ resp = Spaceship::ConnectAPI.post_profiles(
74
+ bundle_id_id: bundle_id_id,
75
+ certificates: certificate_ids,
76
+ devices: device_ids,
77
+ attributes: {
78
+ name: name,
79
+ profileType: profile_type,
80
+ templateName: template_name
81
+ }
82
+ )
83
+ return resp.to_models.first
84
+ end
85
+
86
+ def delete!
87
+ return Spaceship::ConnectAPI.delete_profile(profile_id: id)
88
+ end
58
89
  end
59
90
  end
60
91
  end
@@ -33,14 +33,30 @@ module Spaceship
33
33
  #
34
34
 
35
35
  def get(url_or_path, params = nil)
36
- # The App Store Connect API is only available in a web session through a
37
- # a proxy server where GET requests are actually sent as a POST
38
- return get_as_post(url_or_path, params) if web_session?
36
+ # The Provisioning App Store Connect API needs to be proxied through a
37
+ # POST request if using web session
38
+ return proxy_get(url_or_path, params) if web_session?
39
39
 
40
40
  super(url_or_path, params)
41
41
  end
42
42
 
43
- def get_as_post(url_or_path, params = nil)
43
+ def post(url_or_path, body)
44
+ # The Provisioning App Store Connect API needs teamId added to the body of
45
+ # each post if using web session
46
+ return proxy_post(url_or_path, body) if web_session?
47
+
48
+ super(url_or_path, body)
49
+ end
50
+
51
+ def delete(url_or_path, params = nil)
52
+ # The Provisioning App Store Connect API needs to be proxied through a
53
+ # POST request if using web session
54
+ return proxy_delete(url_or_path, params) if web_session?
55
+
56
+ super(url_or_path, params)
57
+ end
58
+
59
+ def proxy_get(url_or_path, params = nil)
44
60
  encoded_params = Faraday::NestedParamsEncoder.encode(params)
45
61
  body = { "urlEncodedQueryParams" => encoded_params, "teamId" => team_id }
46
62
 
@@ -53,6 +69,32 @@ module Spaceship
53
69
  end
54
70
  handle_response(response)
55
71
  end
72
+
73
+ def proxy_post(url_or_path, body)
74
+ body[:data][:attributes][:teamId] = team_id
75
+
76
+ response = request(:post) do |req|
77
+ req.url(url_or_path)
78
+ req.body = body.to_json
79
+ req.headers['Content-Type'] = 'application/vnd.api+json'
80
+ req.headers['X-Requested-With'] = 'XMLHttpRequest'
81
+ end
82
+ handle_response(response)
83
+ end
84
+
85
+ def proxy_delete(url_or_path, params = nil)
86
+ encoded_params = Faraday::NestedParamsEncoder.encode(params)
87
+ body = { "urlEncodedQueryParams" => encoded_params, "teamId" => team_id }
88
+
89
+ response = request(:post) do |req|
90
+ req.url(url_or_path)
91
+ req.body = body.to_json
92
+ req.headers['Content-Type'] = 'application/vnd.api+json'
93
+ req.headers['X-HTTP-Method-Override'] = 'DELETE'
94
+ req.headers['X-Requested-With'] = 'XMLHttpRequest'
95
+ end
96
+ handle_response(response)
97
+ end
56
98
  end
57
99
  end
58
100
  end
@@ -43,6 +43,47 @@ module Spaceship
43
43
  params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
44
44
  Client.instance.get("profiles", params)
45
45
  end
46
+
47
+ def post_profiles(bundle_id_id: nil, certificates: nil, devices: nil, attributes: {})
48
+ body = {
49
+ data: {
50
+ attributes: attributes,
51
+ type: "profiles",
52
+ relationships: {
53
+ bundleId: {
54
+ data: {
55
+ type: "bundleIds",
56
+ id: bundle_id_id
57
+ }
58
+ },
59
+ certificates: {
60
+ data: certificates.map do |certificate|
61
+ {
62
+ type: "certificates",
63
+ id: certificate
64
+ }
65
+ end
66
+ },
67
+ devices: {
68
+ data: (devices || []).map do |device|
69
+ {
70
+ type: "devices",
71
+ id: device
72
+ }
73
+ end
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ Client.instance.post("profiles", body)
80
+ end
81
+
82
+ def delete_profile(profile_id: nil)
83
+ raise "Profile id is nil" if profile_id.nil?
84
+
85
+ Client.instance.delete("profiles/#{profile_id}")
86
+ end
46
87
  end
47
88
  end
48
89
  end
@@ -347,7 +347,8 @@ module Supply
347
347
  current_package_name,
348
348
  self.current_edit.id,
349
349
  upload_source: path_to_aab,
350
- content_type: "application/octet-stream"
350
+ content_type: "application/octet-stream",
351
+ ack_bundle_installation_warning: Supply.config[:ack_bundle_installation_warning]
351
352
  )
352
353
  end
353
354
 
@@ -309,7 +309,14 @@ module Supply
309
309
  env_name: "SUPPLY_OBB_PATCH_FILE SIZE",
310
310
  description: "Size of 'patch' expansion file in bytes",
311
311
  optional: true,
312
- type: Numeric)
312
+ type: Numeric),
313
+ FastlaneCore::ConfigItem.new(key: :ack_bundle_installation_warning,
314
+ env_name: "ACK_BUNDLE_INSTALLATION_WARNING",
315
+ description: "Must be set to true if the bundle installation may trigger a warning on user devices (e.g can only be downloaded over wifi). Typically this is required for bundles over 150MB",
316
+ optional: true,
317
+ type: Boolean,
318
+ default_value: false)
319
+
313
320
  ]
314
321
  end
315
322
  # rubocop:enable Metrics/PerceivedComplexity
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.154.0
4
+ version: 2.156.0
5
5
  platform: ruby
6
6
  authors:
7
- - Joshua Liebowitz
8
- - Jorge Revuelta H
9
- - Aaron Brager
10
- - Stefan Natchev
11
- - Daniel Jankowski
12
- - Kohki Miki
13
- - Fumiya Nakamura
14
- - Iulian Onofrei
15
- - Felix Krause
16
- - Josh Holtz
17
- - Jimmy Dee
18
- - Olivier Halligon
19
- - Helmut Januschka
20
- - Jan Piotrowski
21
7
  - Luka Mirosevic
22
- - Manu Wallner
23
- - Matthew Ellis
24
8
  - Max Ott
25
- - Jérôme Lacoste
9
+ - Fumiya Nakamura
26
10
  - Danielle Tomlinson
11
+ - Jimmy Dee
12
+ - Iulian Onofrei
13
+ - Matthew Ellis
14
+ - Stefan Natchev
27
15
  - Andrew McBurney
16
+ - Manu Wallner
17
+ - Jorge Revuelta H
18
+ - Olivier Halligon
19
+ - Felix Krause
20
+ - Jan Piotrowski
21
+ - Helmut Januschka
22
+ - Joshua Liebowitz
23
+ - Aaron Brager
24
+ - Kohki Miki
28
25
  - Maksym Grebenets
26
+ - Daniel Jankowski
27
+ - Josh Holtz
28
+ - Jérôme Lacoste
29
29
  autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
- date: 2020-07-29 00:00:00.000000000 Z
32
+ date: 2020-08-11 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: slack-notifier
@@ -944,6 +944,7 @@ files:
944
944
  - deliver/lib/assets/summary.html.erb
945
945
  - deliver/lib/deliver.rb
946
946
  - deliver/lib/deliver/app_screenshot.rb
947
+ - deliver/lib/deliver/app_screenshot_iterator.rb
947
948
  - deliver/lib/deliver/commands_generator.rb
948
949
  - deliver/lib/deliver/detect_values.rb
949
950
  - deliver/lib/deliver/download_screenshots.rb
@@ -952,6 +953,7 @@ files:
952
953
  - deliver/lib/deliver/loader.rb
953
954
  - deliver/lib/deliver/module.rb
954
955
  - deliver/lib/deliver/options.rb
956
+ - deliver/lib/deliver/queue_worker.rb
955
957
  - deliver/lib/deliver/runner.rb
956
958
  - deliver/lib/deliver/setup.rb
957
959
  - deliver/lib/deliver/submit_for_review.rb
@@ -1604,6 +1606,9 @@ files:
1604
1606
  - spaceship/lib/assets/languageMappingReadable.json
1605
1607
  - spaceship/lib/spaceship.rb
1606
1608
  - spaceship/lib/spaceship/.DS_Store
1609
+ - spaceship/lib/spaceship/.client.rb.swp
1610
+ - spaceship/lib/spaceship/.spaceauth_runner.rb.swp
1611
+ - spaceship/lib/spaceship/.two_step_or_factor_client.rb.swp
1607
1612
  - spaceship/lib/spaceship/base.rb
1608
1613
  - spaceship/lib/spaceship/client.rb
1609
1614
  - spaceship/lib/spaceship/commands_generator.rb