fastlane 2.227.0 → 2.232.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +102 -96
- data/bin/fastlane +2 -2
- data/deliver/lib/assets/summary.html.erb +3 -3
- data/deliver/lib/deliver/app_screenshot.rb +215 -347
- data/deliver/lib/deliver/app_screenshot_iterator.rb +4 -1
- data/deliver/lib/deliver/app_screenshot_validator.rb +5 -21
- data/deliver/lib/deliver/loader.rb +2 -9
- data/deliver/lib/deliver/runner.rb +1 -1
- data/deliver/lib/deliver/upload_metadata.rb +5 -0
- data/deliver/lib/deliver/upload_screenshots.rb +4 -2
- data/fastlane/lib/assets/completions/completion.bash +1 -1
- data/fastlane/lib/assets/completions/completion.sh +2 -2
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +19 -14
- data/fastlane/lib/fastlane/actions/appium.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +6 -3
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +11 -7
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +56 -17
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +13 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/import_certificate.rb +9 -1
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +3 -2
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/modify_services.rb +1 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcov.rb +1 -7
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +19 -1
- data/fastlane/lib/fastlane/console.rb +2 -2
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +4 -4
- data/fastlane/lib/fastlane/erb_template_helper.rb +1 -7
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +4 -0
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +20 -20
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -1
- data/fastlane/lib/fastlane/version.rb +2 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +13 -5
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/Atomic.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +5 -4
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +265 -68
- data/fastlane/swift/Fastlane.swift +150 -157
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +3 -1
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +227 -54
- data/fastlane/swift/LaneFileProtocol.swift +4 -2
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +226 -59
- data/fastlane/swift/OptionalConfigValue.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +45 -13
- data/fastlane/swift/RubyCommand.swift +6 -7
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +3 -3
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +334 -84
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +89 -24
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +216 -53
- data/fastlane/swift/SocketClient.swift +7 -7
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Rakefile +1 -2
- data/fastlane/swift/main.swift +1 -1
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +5 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +10 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -1
- data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +5 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +4 -14
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +19 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +143 -106
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +3 -1
- data/fastlane_core/lib/fastlane_core/project.rb +8 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +7 -1
- data/frameit/lib/frameit/device.rb +2 -2
- data/frameit/lib/frameit/device_types.rb +108 -70
- data/frameit/lib/frameit/template_finder.rb +1 -1
- data/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh +1 -0
- data/gym/lib/gym/module.rb +9 -4
- data/gym/lib/gym/options.rb +20 -2
- data/gym/lib/gym/runner.rb +38 -3
- data/match/lib/match/options.rb +1 -0
- data/match/lib/match/storage/s3_storage.rb +4 -7
- data/pilot/lib/pilot/build_manager.rb +7 -1
- data/produce/lib/produce/commands_generator.rb +2 -0
- data/produce/lib/produce/developer_center.rb +1 -0
- data/produce/lib/produce/service.rb +6 -1
- data/scan/lib/scan/error_handler.rb +5 -0
- data/scan/lib/scan/options.rb +13 -3
- data/scan/lib/scan/test_command_generator.rb +10 -2
- data/sigh/lib/assets/resign.sh +6 -3
- data/sigh/lib/sigh/local_manage.rb +6 -4
- data/sigh/lib/sigh/options.rb +1 -0
- data/sigh/lib/sigh/runner.rb +23 -3
- data/snapshot/lib/snapshot/detect_values.rb +1 -1
- data/snapshot/lib/snapshot/options.rb +13 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +4 -2
- data/spaceship/lib/spaceship/client.rb +32 -2
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +65 -9
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +4 -4
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +16 -16
- data/spaceship/lib/spaceship/connect_api/models/build_upload.rb +42 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +32 -2
- data/spaceship/lib/spaceship/connect_api/models/device.rb +1 -2
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +2 -3
- data/spaceship/lib/spaceship/connect_api/models/webhook.rb +62 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +0 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +9 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +38 -0
- data/spaceship/lib/spaceship/connect_api.rb +2 -0
- data/spaceship/lib/spaceship/errors.rb +8 -6
- data/spaceship/lib/spaceship/portal/key.rb +22 -3
- data/spaceship/lib/spaceship/portal/portal_client.rb +29 -2
- data/spaceship/lib/spaceship/spaceauth_runner.rb +5 -15
- data/supply/lib/supply/client.rb +18 -1
- data/trainer/lib/trainer/legacy_xcresult.rb +1 -1
- data/trainer/lib/trainer/test_parser.rb +1 -1
- data/trainer/lib/trainer/xcresult/helper.rb +11 -1
- metadata +153 -37
- data/fastlane/lib/fastlane/actions/hipchat.rb +0 -200
- data/fastlane/lib/fastlane/core_ext/bundler_monkey_patch.rb +0 -14
- data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +0 -43
- data/fastlane/lib/fastlane/plugins/template/.travis.yml +0 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_relative '../model'
|
|
2
|
+
|
|
3
|
+
module Spaceship
|
|
4
|
+
class ConnectAPI
|
|
5
|
+
class Webhook
|
|
6
|
+
include Spaceship::ConnectAPI::Model
|
|
7
|
+
|
|
8
|
+
attr_accessor :enabled
|
|
9
|
+
attr_accessor :event_types
|
|
10
|
+
attr_accessor :name
|
|
11
|
+
attr_accessor :url
|
|
12
|
+
|
|
13
|
+
attr_mapping({
|
|
14
|
+
"enabled" => "enabled",
|
|
15
|
+
"eventTypes" => "event_types",
|
|
16
|
+
"name" => "name",
|
|
17
|
+
"url" => "url"
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
# Found at https://developer.apple.com/documentation/appstoreconnectapi/webhookeventtype
|
|
21
|
+
module EventType
|
|
22
|
+
ALTERNATIVE_DISTRIBUTION_PACKAGE_AVAILABLE_UPDATED = "ALTERNATIVE_DISTRIBUTION_PACKAGE_AVAILABLE_UPDATED"
|
|
23
|
+
ALTERNATIVE_DISTRIBUTION_PACKAGE_VERSION_CREATED = "ALTERNATIVE_DISTRIBUTION_PACKAGE_VERSION_CREATED"
|
|
24
|
+
ALTERNATIVE_DISTRIBUTION_TERRITORY_AVAILABILITY_UPDATED = "ALTERNATIVE_DISTRIBUTION_TERRITORY_AVAILABILITY_UPDATED"
|
|
25
|
+
APP_STORE_VERSION_APP_VERSION_STATE_UPDATED = "APP_STORE_VERSION_APP_VERSION_STATE_UPDATED"
|
|
26
|
+
BACKGROUND_ASSET_VERSION_APP_STORE_RELEASE_STATE_UPDATED = "BACKGROUND_ASSET_VERSION_APP_STORE_RELEASE_STATE_UPDATED"
|
|
27
|
+
BACKGROUND_ASSET_VERSION_EXTERNAL_BETA_RELEASE_STATE_UPDATED = "BACKGROUND_ASSET_VERSION_EXTERNAL_BETA_RELEASE_STATE_UPDATED"
|
|
28
|
+
BACKGROUND_ASSET_VERSION_INTERNAL_BETA_RELEASE_CREATED = "BACKGROUND_ASSET_VERSION_INTERNAL_BETA_RELEASE_CREATED"
|
|
29
|
+
BACKGROUND_ASSET_VERSION_STATE_UPDATED = "BACKGROUND_ASSET_VERSION_STATE_UPDATED"
|
|
30
|
+
BETA_FEEDBACK_CRASH_SUBMISSION_CREATED = "BETA_FEEDBACK_CRASH_SUBMISSION_CREATED"
|
|
31
|
+
BETA_FEEDBACK_SCREENSHOT_SUBMISSION_CREATED = "BETA_FEEDBACK_SCREENSHOT_SUBMISSION_CREATED"
|
|
32
|
+
BUILD_BETA_DETAIL_EXTERNAL_BUILD_STATE_UPDATED = "BUILD_BETA_DETAIL_EXTERNAL_BUILD_STATE_UPDATED"
|
|
33
|
+
BUILD_UPLOAD_STATE_UPDATED = "BUILD_UPLOAD_STATE_UPDATED"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.type
|
|
37
|
+
return "webhooks"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# API
|
|
42
|
+
#
|
|
43
|
+
|
|
44
|
+
def self.all(client: nil, app_id:, filter: {}, includes: nil, limit: nil, sort: nil)
|
|
45
|
+
client ||= Spaceship::ConnectAPI
|
|
46
|
+
resps = client.get_webhooks(app_id: app_id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
|
47
|
+
return resps.flat_map(&:to_models)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def self.create(client: nil, app_id:, enabled: true, event_types:, name:, secret:, url:)
|
|
51
|
+
client ||= Spaceship::ConnectAPI
|
|
52
|
+
resp = client.post_webhook(app_id: app_id, enabled: enabled, event_types: event_types, name: name, secret: secret, url: url)
|
|
53
|
+
return resp.to_models.first
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def delete!(client: nil)
|
|
57
|
+
client ||= Spaceship::ConnectAPI
|
|
58
|
+
return client.delete_webhook(webhook_id: id)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -494,6 +494,15 @@ module Spaceship
|
|
|
494
494
|
test_flight_request_client.get("#{Version::V1}/apps/#{app_id}/buildDeliveries", params)
|
|
495
495
|
end
|
|
496
496
|
|
|
497
|
+
#
|
|
498
|
+
# buildUploads
|
|
499
|
+
#
|
|
500
|
+
|
|
501
|
+
def get_build_uploads(app_id:, filter: {}, includes: nil, limit: nil, sort: nil)
|
|
502
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
|
503
|
+
test_flight_request_client.get("#{Version::V1}/apps/#{app_id}/buildUploads", params)
|
|
504
|
+
end
|
|
505
|
+
|
|
497
506
|
#
|
|
498
507
|
# preReleaseVersions
|
|
499
508
|
#
|
|
@@ -1242,6 +1242,44 @@ module Spaceship
|
|
|
1242
1242
|
params = tunes_request_client.build_params(filter: filter, includes: includes)
|
|
1243
1243
|
tunes_request_client.get("#{Version::V1}/reviewRejections", params)
|
|
1244
1244
|
end
|
|
1245
|
+
|
|
1246
|
+
#
|
|
1247
|
+
# webhooks
|
|
1248
|
+
#
|
|
1249
|
+
|
|
1250
|
+
def get_webhooks(app_id:, filter: {}, includes: nil, limit: nil, sort: nil)
|
|
1251
|
+
params = tunes_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
|
1252
|
+
tunes_request_client.get("#{Version::V1}/apps/#{app_id}/webhooks", params)
|
|
1253
|
+
end
|
|
1254
|
+
|
|
1255
|
+
def post_webhook(app_id:, enabled:, event_types:, name:, secret:, url:)
|
|
1256
|
+
body = {
|
|
1257
|
+
data: {
|
|
1258
|
+
type: "webhooks",
|
|
1259
|
+
attributes: {
|
|
1260
|
+
enabled: enabled,
|
|
1261
|
+
eventTypes: event_types,
|
|
1262
|
+
name: name,
|
|
1263
|
+
secret: secret,
|
|
1264
|
+
url: url
|
|
1265
|
+
},
|
|
1266
|
+
relationships: {
|
|
1267
|
+
app: {
|
|
1268
|
+
data: {
|
|
1269
|
+
id: app_id,
|
|
1270
|
+
type: "apps"
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
tunes_request_client.post("#{Version::V1}/webhooks", body)
|
|
1278
|
+
end
|
|
1279
|
+
|
|
1280
|
+
def delete_webhook(webhook_id:)
|
|
1281
|
+
tunes_request_client.delete("#{Version::V1}/webhooks/#{webhook_id}")
|
|
1282
|
+
end
|
|
1245
1283
|
end
|
|
1246
1284
|
end
|
|
1247
1285
|
end
|
|
@@ -31,6 +31,7 @@ require 'spaceship/connect_api/models/beta_tester'
|
|
|
31
31
|
require 'spaceship/connect_api/models/beta_tester_metric'
|
|
32
32
|
require 'spaceship/connect_api/models/build'
|
|
33
33
|
require 'spaceship/connect_api/models/build_delivery'
|
|
34
|
+
require 'spaceship/connect_api/models/build_upload'
|
|
34
35
|
require 'spaceship/connect_api/models/build_beta_detail'
|
|
35
36
|
require 'spaceship/connect_api/models/build_bundle'
|
|
36
37
|
require 'spaceship/connect_api/models/build_bundle_file_sizes'
|
|
@@ -74,6 +75,7 @@ require 'spaceship/connect_api/models/resolution_center_message'
|
|
|
74
75
|
require 'spaceship/connect_api/models/resolution_center_thread'
|
|
75
76
|
require 'spaceship/connect_api/models/review_rejection'
|
|
76
77
|
require 'spaceship/connect_api/models/actor'
|
|
78
|
+
require 'spaceship/connect_api/models/webhook'
|
|
77
79
|
|
|
78
80
|
module Spaceship
|
|
79
81
|
class ConnectAPI
|
|
@@ -116,9 +116,11 @@ module Spaceship
|
|
|
116
116
|
|
|
117
117
|
# Base class for errors coming from App Store Connect locale changes
|
|
118
118
|
class AppStoreLocaleError < BasicPreferredInfoError
|
|
119
|
-
def initialize(
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
def initialize(locale, error)
|
|
120
|
+
error_message = error.respond_to?(:message) ? error.message : error.to_s
|
|
121
|
+
locale_str = locale || "unknown"
|
|
122
|
+
@message = "An exception has occurred for locale: #{locale_str}.\nError: #{error_message}"
|
|
123
|
+
super(@message)
|
|
122
124
|
end
|
|
123
125
|
|
|
124
126
|
# no need to search github issues since the error is specific
|
|
@@ -130,21 +132,21 @@ module Spaceship
|
|
|
130
132
|
# Raised for localized text errors from App Store Connect
|
|
131
133
|
class AppStoreLocalizationError < AppStoreLocaleError
|
|
132
134
|
def preferred_error_info
|
|
133
|
-
"#{@message}
|
|
135
|
+
"#{@message}\nCheck the localization requirements here: https://developer.apple.com/help/app-store-connect/manage-app-information/localize-app-information"
|
|
134
136
|
end
|
|
135
137
|
end
|
|
136
138
|
|
|
137
139
|
# Raised for localized screenshots errors from App Store Connect
|
|
138
140
|
class AppStoreScreenshotError < AppStoreLocaleError
|
|
139
141
|
def preferred_error_info
|
|
140
|
-
"#{@message}
|
|
142
|
+
"#{@message}\nCheck the screenshot requirements here: https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications"
|
|
141
143
|
end
|
|
142
144
|
end
|
|
143
145
|
|
|
144
146
|
# Raised for localized app preview errors from App Store Connect
|
|
145
147
|
class AppStoreAppPreviewError < AppStoreLocaleError
|
|
146
148
|
def preferred_error_info
|
|
147
|
-
"#{@message}
|
|
149
|
+
"#{@message}\nCheck the app preview requirements here: https://developer.apple.com/help/app-store-connect/reference/app-preview-specifications"
|
|
148
150
|
end
|
|
149
151
|
end
|
|
150
152
|
end
|
|
@@ -42,9 +42,28 @@ module Spaceship
|
|
|
42
42
|
# @param music_id [String] the Music Id id (the autogenerated id, not the user specified identifier "music.com.etc...")
|
|
43
43
|
def self.create(name: nil, apns: nil, device_check: nil, music_id: nil)
|
|
44
44
|
service_config = {}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
if apns
|
|
47
|
+
service_config[APNS_ID] = {
|
|
48
|
+
scope: 'team',
|
|
49
|
+
environment: 'all',
|
|
50
|
+
identifiers: {}
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if device_check
|
|
55
|
+
service_config[DEVICE_CHECK_ID] = {
|
|
56
|
+
identifiers: {}
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if music_id
|
|
61
|
+
service_config[MUSIC_KIT_ID] = {
|
|
62
|
+
identifiers: {
|
|
63
|
+
music: [music_id]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
end
|
|
48
67
|
|
|
49
68
|
key = client.create_key!(name: name, service_configs: service_config)
|
|
50
69
|
new(key)
|
|
@@ -10,6 +10,7 @@ require_relative 'provisioning_profile'
|
|
|
10
10
|
require_relative 'certificate'
|
|
11
11
|
require_relative 'website_push'
|
|
12
12
|
require_relative 'persons'
|
|
13
|
+
require_relative 'key'
|
|
13
14
|
|
|
14
15
|
module Spaceship
|
|
15
16
|
# rubocop:disable Metrics/ClassLength
|
|
@@ -780,13 +781,39 @@ module Spaceship
|
|
|
780
781
|
def create_key!(name: nil, service_configs: nil)
|
|
781
782
|
fetch_csrf_token_for_keys
|
|
782
783
|
|
|
784
|
+
service_configs_requests = (service_configs || {}).map do |service_id, configs|
|
|
785
|
+
if service_id == Spaceship::Portal::Key::MUSIC_KIT_ID
|
|
786
|
+
{
|
|
787
|
+
serviceId: service_id,
|
|
788
|
+
isNew: true,
|
|
789
|
+
identifiers: configs[:identifiers] || {}
|
|
790
|
+
}
|
|
791
|
+
elsif service_id == Spaceship::Portal::Key::DEVICE_CHECK_ID
|
|
792
|
+
{
|
|
793
|
+
serviceId: service_id,
|
|
794
|
+
isNew: true,
|
|
795
|
+
identifiers: configs[:identifiers] || {}
|
|
796
|
+
}
|
|
797
|
+
elsif service_id == Spaceship::Portal::Key::APNS_ID
|
|
798
|
+
{
|
|
799
|
+
serviceId: service_id,
|
|
800
|
+
isNew: true,
|
|
801
|
+
identifiers: configs[:identifiers] || {},
|
|
802
|
+
environment: configs[:environment] || "all",
|
|
803
|
+
scope: configs[:scope] || "team"
|
|
804
|
+
}
|
|
805
|
+
else
|
|
806
|
+
raise "Unknown service id: #{service_id}"
|
|
807
|
+
end
|
|
808
|
+
end
|
|
809
|
+
|
|
783
810
|
params = {
|
|
784
811
|
name: name,
|
|
785
|
-
|
|
812
|
+
serviceConfigurationsRequests: service_configs_requests,
|
|
786
813
|
teamId: team_id
|
|
787
814
|
}
|
|
788
815
|
|
|
789
|
-
response = request(:post, 'account/auth/key/create') do |req|
|
|
816
|
+
response = request(:post, 'account/auth/key/v2/create') do |req|
|
|
790
817
|
req.headers['Content-Type'] = 'application/json'
|
|
791
818
|
req.body = params.to_json
|
|
792
819
|
end
|
|
@@ -68,21 +68,11 @@ module Spaceship
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def load_cookies(content)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
aliases: true
|
|
77
|
-
)
|
|
78
|
-
else
|
|
79
|
-
YAML.safe_load(
|
|
80
|
-
content,
|
|
81
|
-
[HTTP::Cookie, Time], # classes allowlist
|
|
82
|
-
[], # symbols allowlist
|
|
83
|
-
true # allow YAML aliases
|
|
84
|
-
)
|
|
85
|
-
end
|
|
71
|
+
YAML.safe_load(
|
|
72
|
+
content,
|
|
73
|
+
permitted_classes: [HTTP::Cookie, Time],
|
|
74
|
+
aliases: true
|
|
75
|
+
)
|
|
86
76
|
end
|
|
87
77
|
|
|
88
78
|
def session_string
|
data/supply/lib/supply/client.rb
CHANGED
|
@@ -46,7 +46,24 @@ module Supply
|
|
|
46
46
|
# Initializes the service and its auth_client using the specified information
|
|
47
47
|
# @param service_account_json: The raw service account Json data
|
|
48
48
|
def initialize(service_account_json: nil, params: nil)
|
|
49
|
-
|
|
49
|
+
# decode the json and check its type
|
|
50
|
+
begin
|
|
51
|
+
json_content = service_account_json.read
|
|
52
|
+
google_credentials = JSON.parse(json_content)
|
|
53
|
+
service_account_json.rewind
|
|
54
|
+
rescue JSON::ParserError
|
|
55
|
+
UI.user_error!("Invalid Google Credentials file provided - unable to parse json.")
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# use correct credential class based on type
|
|
59
|
+
case google_credentials['type']
|
|
60
|
+
when "external_account"
|
|
61
|
+
auth_client = Google::Auth::ExternalAccount::Credentials.make_creds(json_key_io: service_account_json, scope: self.class::SCOPE)
|
|
62
|
+
when "service_account"
|
|
63
|
+
auth_client = Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: service_account_json, scope: self.class::SCOPE)
|
|
64
|
+
else
|
|
65
|
+
UI.user_error!("Invalid Google Credentials file provided - no credential type found.")
|
|
66
|
+
end
|
|
50
67
|
|
|
51
68
|
UI.verbose("Fetching a new access token from Google...")
|
|
52
69
|
|
|
@@ -570,7 +570,7 @@ module Trainer
|
|
|
570
570
|
path
|
|
571
571
|
]
|
|
572
572
|
|
|
573
|
-
xcresulttool_cmd << '--legacy' if Trainer::XCResult::Helper.
|
|
573
|
+
xcresulttool_cmd << '--legacy' if Trainer::XCResult::Helper.supports_xcresulttool_version_23?
|
|
574
574
|
|
|
575
575
|
xcresulttool_cmd
|
|
576
576
|
end
|
|
@@ -101,7 +101,7 @@ module Trainer
|
|
|
101
101
|
UI.user_error!("File not found at path '#{path}'") unless File.exist?(path)
|
|
102
102
|
|
|
103
103
|
if File.directory?(path) && path.end_with?(".xcresult")
|
|
104
|
-
parser = XCResult::Helper.
|
|
104
|
+
parser = XCResult::Helper.supports_xcresulttool_version_23? && !config[:force_legacy_xcresulttool] ? XCResult::Parser : LegacyXCResult::Parser
|
|
105
105
|
self.data = parser.parse_xcresult(path: path, output_remove_retry_attempts: config[:output_remove_retry_attempts])
|
|
106
106
|
else
|
|
107
107
|
file_content = File.read(path)
|
|
@@ -38,7 +38,7 @@ module Trainer
|
|
|
38
38
|
# and replaced it with `xcrun xcresulttool get test-results tests` instead.
|
|
39
39
|
#
|
|
40
40
|
# @return [Boolean] Whether the xcresulttool supports Xcode 16+ commands
|
|
41
|
-
def self.
|
|
41
|
+
def self.supports_xcresulttool_version_23?
|
|
42
42
|
# e.g. DEVELOPER_DIR=/Applications/Xcode_16_beta_3.app
|
|
43
43
|
# xcresulttool version 23021, format version 3.53 (current)
|
|
44
44
|
match = `xcrun xcresulttool version`.match(/xcresulttool version (?<version>[\d.]+)/)
|
|
@@ -48,6 +48,16 @@ module Trainer
|
|
|
48
48
|
rescue
|
|
49
49
|
false
|
|
50
50
|
end
|
|
51
|
+
|
|
52
|
+
def self.supports_xcresulttool_version_24?
|
|
53
|
+
# xcresulttool version 24408, schema version: 0.1.0 (legacy commands format version: 3.56)
|
|
54
|
+
match = `xcrun xcresulttool version`.match(/xcresulttool version (?<version>[\d.]+)/)
|
|
55
|
+
version = match[:version]
|
|
56
|
+
|
|
57
|
+
Gem::Version.new(version) >= Gem::Version.new(24_408)
|
|
58
|
+
rescue
|
|
59
|
+
false
|
|
60
|
+
end
|
|
51
61
|
end
|
|
52
62
|
end
|
|
53
63
|
end
|