fastlane 2.154.0 → 2.155.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -78
  3. data/deliver/lib/deliver/html_generator.rb +8 -1
  4. data/fastlane/lib/fastlane/actions/create_keychain.rb +5 -1
  5. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +5 -0
  6. data/fastlane/lib/fastlane/version.rb +1 -1
  7. data/fastlane/swift/Deliverfile.swift +1 -1
  8. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  9. data/fastlane/swift/Fastlane.swift +375 -182
  10. data/fastlane/swift/Gymfile.swift +1 -1
  11. data/fastlane/swift/GymfileProtocol.swift +1 -1
  12. data/fastlane/swift/Matchfile.swift +1 -1
  13. data/fastlane/swift/MatchfileProtocol.swift +6 -2
  14. data/fastlane/swift/Precheckfile.swift +1 -1
  15. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  16. data/fastlane/swift/Scanfile.swift +1 -1
  17. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  18. data/fastlane/swift/Screengrabfile.swift +1 -1
  19. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  20. data/fastlane/swift/Snapshotfile.swift +1 -1
  21. data/fastlane/swift/SnapshotfileProtocol.swift +5 -1
  22. data/gym/lib/gym/detect_values.rb +6 -3
  23. data/gym/lib/gym/module.rb +22 -0
  24. data/gym/lib/gym/runner.rb +8 -10
  25. data/match/lib/match/generator.rb +6 -0
  26. data/match/lib/match/options.rb +7 -2
  27. data/match/lib/match/runner.rb +12 -5
  28. data/match/lib/match/spaceship_ensure.rb +7 -9
  29. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  30. data/sigh/lib/sigh/download_all.rb +42 -27
  31. data/sigh/lib/sigh/module.rb +26 -0
  32. data/sigh/lib/sigh/options.rb +2 -2
  33. data/sigh/lib/sigh/runner.rb +74 -33
  34. data/snapshot/lib/snapshot/options.rb +5 -0
  35. data/snapshot/lib/snapshot/test_command_generator.rb +3 -2
  36. data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +4 -1
  37. data/spaceship/lib/spaceship/connect_api/client.rb +2 -0
  38. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  39. data/spaceship/lib/spaceship/connect_api/models/app.rb +3 -1
  40. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +17 -5
  41. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +41 -7
  42. data/spaceship/lib/spaceship/connect_api/models/profile.rb +31 -1
  43. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +46 -4
  44. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +41 -0
  45. data/supply/lib/supply/client.rb +2 -1
  46. data/supply/lib/supply/options.rb +8 -1
  47. metadata +17 -17
@@ -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,23 @@ 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)
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
+ }
81
+ )
82
+ return resp.to_models.first
83
+ end
84
+
85
+ def delete!
86
+ return Spaceship::ConnectAPI.delete_profile(profile_id: id)
87
+ end
58
88
  end
59
89
  end
60
90
  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 |certificate|
69
+ {
70
+ type: "devices",
71
+ id: devices
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.155.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
7
+ - Manu Wallner
8
+ - Helmut Januschka
9
+ - Jérôme Lacoste
13
10
  - Fumiya Nakamura
14
- - Iulian Onofrei
15
11
  - Felix Krause
16
- - Josh Holtz
17
12
  - Jimmy Dee
18
- - Olivier Halligon
19
- - Helmut Januschka
13
+ - Iulian Onofrei
14
+ - Danielle Tomlinson
15
+ - Maksym Grebenets
20
16
  - Jan Piotrowski
21
17
  - Luka Mirosevic
22
- - Manu Wallner
23
- - Matthew Ellis
18
+ - Joshua Liebowitz
19
+ - Daniel Jankowski
24
20
  - Max Ott
25
- - Jérôme Lacoste
26
- - Danielle Tomlinson
21
+ - Olivier Halligon
22
+ - Josh Holtz
23
+ - Matthew Ellis
24
+ - Stefan Natchev
25
+ - Jorge Revuelta H
26
+ - Kohki Miki
27
+ - Aaron Brager
27
28
  - Andrew McBurney
28
- - Maksym Grebenets
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-06 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: slack-notifier