fastlane 2.190.0 → 2.193.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +90 -90
- data/deliver/lib/deliver/app_screenshot.rb +2 -1
- data/deliver/lib/deliver/app_screenshot_iterator.rb +2 -2
- data/deliver/lib/deliver/loader.rb +1 -1
- data/deliver/lib/deliver/options.rb +6 -0
- data/deliver/lib/deliver/runner.rb +9 -1
- data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
- data/deliver/lib/deliver/sync_screenshots.rb +200 -0
- data/fastlane/lib/assets/completions/completion.bash +4 -1
- data/fastlane/lib/assets/completions/completion.zsh +6 -5
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +97 -17
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -1
- data/fastlane/lib/fastlane/actions/gradle.rb +1 -1
- data/fastlane/lib/fastlane/actions/notarize.rb +77 -1
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +3 -1
- data/fastlane/lib/fastlane/actions/zip.rb +4 -3
- data/fastlane/lib/fastlane/features.rb +3 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +5 -1
- data/fastlane/swift/Fastlane.swift +82 -20
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +2 -2
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +8 -8
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +25 -6
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -0
- data/match/lib/match/options.rb +1 -1
- data/match/lib/match/runner.rb +10 -9
- data/pilot/lib/pilot/build_manager.rb +14 -4
- data/pilot/lib/pilot/manager.rb +3 -1
- data/pilot/lib/pilot/options.rb +20 -1
- data/produce/lib/produce/commands_generator.rb +28 -0
- data/produce/lib/produce/service.rb +16 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +15 -1
- data/spaceship/lib/spaceship/connect_api/models/app.rb +9 -1
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +7 -5
- data/spaceship/lib/spaceship/connect_api/token.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +34 -1
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/supply/lib/supply/client.rb +38 -5
- data/supply/lib/supply/options.rb +7 -0
- data/supply/lib/supply/uploader.rb +1 -1
- metadata +39 -21
@@ -43,17 +43,17 @@
|
|
43
43
|
"macOS": "10.15.7"
|
44
44
|
},
|
45
45
|
"big_sur": {
|
46
|
-
"HOMEBREW_VERSION": "2.
|
47
|
-
"HOMEBREW_PREFIX": "/
|
48
|
-
"Homebrew/homebrew-core": "
|
49
|
-
"CLT": "
|
50
|
-
"Xcode": "
|
51
|
-
"macOS": "11.
|
46
|
+
"HOMEBREW_VERSION": "3.2.10-50-ge3f851d",
|
47
|
+
"HOMEBREW_PREFIX": "/opt/homebrew",
|
48
|
+
"Homebrew/homebrew-core": "73588fb5f5edccfe62f1b290a3298b402fbd71d5",
|
49
|
+
"CLT": "12.5.1.0.1.1623191612",
|
50
|
+
"Xcode": "13.0",
|
51
|
+
"macOS": "11.5.2"
|
52
52
|
},
|
53
53
|
"monterey": {
|
54
|
-
"HOMEBREW_VERSION": "3.2.
|
54
|
+
"HOMEBREW_VERSION": "3.2.6-34-g6bb3699",
|
55
55
|
"HOMEBREW_PREFIX": "/usr/local",
|
56
|
-
"Homebrew/homebrew-core": "
|
56
|
+
"Homebrew/homebrew-core": "b7523de28df0f0f819ff2c49c84611eec19f5455",
|
57
57
|
"CLT": "13.0.0.0.1.1626155413",
|
58
58
|
"Xcode": "13.0",
|
59
59
|
"macOS": "12.0"
|
@@ -11,7 +11,7 @@ module FastlaneCore
|
|
11
11
|
|
12
12
|
class << self
|
13
13
|
# @return The build we waited for. This method will always return a build
|
14
|
-
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
14
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false, wait_for_build_beta_detail_processing: false)
|
15
15
|
# Warn about train_version being removed in the future
|
16
16
|
if train_version
|
17
17
|
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
@@ -41,13 +41,13 @@ module FastlaneCore
|
|
41
41
|
showed_info = true
|
42
42
|
end
|
43
43
|
|
44
|
-
report_status(build: matched_build)
|
44
|
+
report_status(build: matched_build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing)
|
45
45
|
|
46
46
|
# Processing of builds by AppStoreConnect can be a very time consuming task and will
|
47
47
|
# block the worker running this task until it is completed. In some cases,
|
48
48
|
# having a build resource appear in AppStoreConnect (matched_build) may be enough (i.e. setting a changelog)
|
49
49
|
# so here we may choose to skip the full processing of the build if return_when_build_appears is true
|
50
|
-
if matched_build && (return_when_build_appears ||
|
50
|
+
if matched_build && (return_when_build_appears || processed?(build: matched_build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing))
|
51
51
|
|
52
52
|
if !app_version.nil? && app_version != app_version_queried
|
53
53
|
UI.important("App version is #{app_version} but build was found while querying #{app_version_queried}")
|
@@ -145,10 +145,29 @@ module FastlaneCore
|
|
145
145
|
return nil
|
146
146
|
end
|
147
147
|
|
148
|
-
def
|
149
|
-
|
148
|
+
def processed?(build: nil, wait_for_build_beta_detail_processing: false)
|
149
|
+
return false unless build
|
150
|
+
|
151
|
+
is_processed = build.processed?
|
152
|
+
|
153
|
+
# App Store Connect API has multiple build processing states
|
154
|
+
# builds have one processing status
|
155
|
+
# buildBetaDetails have two processing statues (internal and external testing)
|
156
|
+
#
|
157
|
+
# If set, this method will only return true if all three statuses are complete
|
158
|
+
if wait_for_build_beta_detail_processing
|
159
|
+
is_processed &&= build.build_beta_detail.processed?
|
160
|
+
end
|
161
|
+
|
162
|
+
return is_processed
|
163
|
+
end
|
164
|
+
|
165
|
+
def report_status(build: nil, wait_for_build_beta_detail_processing: false)
|
166
|
+
is_processed = processed?(build: build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing)
|
167
|
+
|
168
|
+
if build && !is_processed
|
150
169
|
UI.message("Waiting for App Store Connect to finish processing the new build (#{build.app_version} - #{build.version}) for #{build.platform}")
|
151
|
-
elsif build &&
|
170
|
+
elsif build && is_processed
|
152
171
|
UI.success("Successfully finished processing the build #{build.app_version} - #{build.version} for #{build.platform}")
|
153
172
|
else
|
154
173
|
UI.message("Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)")
|
@@ -10,6 +10,11 @@ module FastlaneCore
|
|
10
10
|
return nil
|
11
11
|
end
|
12
12
|
|
13
|
+
# Fetches the app platform from the given pkg file.
|
14
|
+
def self.fetch_app_platform(path)
|
15
|
+
return "osx"
|
16
|
+
end
|
17
|
+
|
13
18
|
# Fetches the app version from the given pkg file.
|
14
19
|
def self.fetch_app_version(path)
|
15
20
|
xml = self.fetch_distribution_xml_file(path)
|
@@ -34,6 +34,46 @@ module Commander
|
|
34
34
|
|
35
35
|
attr_accessor :collector
|
36
36
|
|
37
|
+
# Temporary work around for issues mentioned in https://github.com/fastlane/fastlane/pull/18760
|
38
|
+
# Code taken from https://github.com/commander-rb/commander/blob/40d06bfbc54906d0de7c72ac73f4e9188c9ca294/lib/commander/runner.rb#L372-L385
|
39
|
+
#
|
40
|
+
# Problem:
|
41
|
+
# `optparse` is guessing that command option `-e` is referring to global option `--env` (because it starts with an e).
|
42
|
+
# This is raising OptionParser::MissingArgument error because `--env` takes a string argument.
|
43
|
+
# A command of `-e --verbose` works because `--verbose` is seen as the argument.
|
44
|
+
# A command of `--verbose -e` doesn't work because no argument after `-e` so MissingArgument is raised again.
|
45
|
+
# This broke somewhere between Ruby 2.5 and Ruby 2.6
|
46
|
+
#
|
47
|
+
# Solution:
|
48
|
+
# Proper solution is to set `parser.require_exact = true` but this only available on `optparse` version 0.1.1
|
49
|
+
# which is not used by Commander.
|
50
|
+
# `require_exact` will prevent OptionParser from assuming `-e` is the same as `--env STRING`
|
51
|
+
# Even if it was on RubyGems, it would require Commander to allow this option to be set on OptionParser
|
52
|
+
#
|
53
|
+
# This work around was made on 2021-08-13
|
54
|
+
#
|
55
|
+
# When fixed:
|
56
|
+
# This method implementation overrides one provided by Commander::Runner already. Just delete this method
|
57
|
+
# so the existing one can be used
|
58
|
+
def parse_global_options
|
59
|
+
parser = options.inject(OptionParser.new) do |options, option|
|
60
|
+
options.on(*option[:args], &global_option_proc(option[:switches], &option[:proc]))
|
61
|
+
end
|
62
|
+
|
63
|
+
# This is the actual solution but is only in version 0.1.1 of optparse and its not in Commander
|
64
|
+
# This is the only change from Commanders implementation of parse_global_options
|
65
|
+
parser.require_exact = true
|
66
|
+
|
67
|
+
options = @args.dup
|
68
|
+
begin
|
69
|
+
parser.parse!(options)
|
70
|
+
rescue OptionParser::InvalidOption => e
|
71
|
+
# Remove the offending args and retry.
|
72
|
+
options = options.reject { |o| e.args.include?(o) }
|
73
|
+
retry
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
37
77
|
def run!
|
38
78
|
require_program(:version, :description)
|
39
79
|
trap('INT') { abort(program(:int_message)) } if program(:int_message)
|
@@ -47,6 +87,7 @@ module Commander
|
|
47
87
|
say(version)
|
48
88
|
return
|
49
89
|
end
|
90
|
+
|
50
91
|
parse_global_options
|
51
92
|
remove_global_options(options, @args)
|
52
93
|
|
data/match/lib/match/options.rb
CHANGED
@@ -239,7 +239,7 @@ module Match
|
|
239
239
|
default_value: false),
|
240
240
|
FastlaneCore::ConfigItem.new(key: :force_for_new_devices,
|
241
241
|
env_name: "MATCH_FORCE_FOR_NEW_DEVICES",
|
242
|
-
description: "Renew the provisioning profiles if the device count on the developer portal has changed. Ignored for profile
|
242
|
+
description: "Renew the provisioning profiles if the device count on the developer portal has changed. Ignored for profile types 'appstore' and 'developer_id'",
|
243
243
|
type: Boolean,
|
244
244
|
default_value: false),
|
245
245
|
FastlaneCore::ConfigItem.new(key: :skip_confirmation,
|
data/match/lib/match/runner.rb
CHANGED
@@ -191,12 +191,12 @@ module Match
|
|
191
191
|
UI.verbose("Certificate '#{File.basename(cert_path)}' is already installed on this machine")
|
192
192
|
else
|
193
193
|
Utils.import(cert_path, params[:keychain_name], password: params[:keychain_password])
|
194
|
-
end
|
195
194
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
195
|
+
# Import the private key
|
196
|
+
# there seems to be no good way to check if it's already installed - so just install it
|
197
|
+
# Key will only be added to the partition list if it isn't already installed
|
198
|
+
Utils.import(keys.last, params[:keychain_name], password: params[:keychain_password])
|
199
|
+
end
|
200
200
|
else
|
201
201
|
UI.message("Skipping installation of certificate as it would not work on this operating system.")
|
202
202
|
end
|
@@ -243,13 +243,14 @@ module Match
|
|
243
243
|
force = params[:force]
|
244
244
|
|
245
245
|
if params[:force_for_new_devices] && !params[:readonly]
|
246
|
-
|
246
|
+
prov_types_without_devices = [:appstore, :developer_id]
|
247
|
+
if !prov_types_without_devices.include?(prov_type) && !params[:force]
|
247
248
|
force = device_count_different?(profile: profile, keychain_path: keychain_path, platform: params[:platform].to_sym)
|
248
249
|
else
|
249
250
|
# App Store provisioning profiles don't contain device identifiers and
|
250
251
|
# thus shouldn't be renewed if the device count has changed.
|
251
|
-
UI.important("Warning: `force_for_new_devices` is set but is ignored for App Store provisioning profiles.")
|
252
|
-
UI.important("You can safely stop specifying `force_for_new_devices` when running Match for type 'appstore'.")
|
252
|
+
UI.important("Warning: `force_for_new_devices` is set but is ignored for App Store & Developer ID provisioning profiles.")
|
253
|
+
UI.important("You can safely stop specifying `force_for_new_devices` when running Match for type 'appstore' or 'developer_id'.")
|
253
254
|
end
|
254
255
|
end
|
255
256
|
|
@@ -343,7 +344,7 @@ module Match
|
|
343
344
|
[
|
344
345
|
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_TV
|
345
346
|
]
|
346
|
-
when :
|
347
|
+
when :macos, :catalyst
|
347
348
|
[
|
348
349
|
Spaceship::ConnectAPI::Device::DeviceClass::MAC
|
349
350
|
]
|
@@ -16,7 +16,7 @@ module Pilot
|
|
16
16
|
should_login_in_start = options[:apple_id].nil?
|
17
17
|
start(options, should_login: should_login_in_start)
|
18
18
|
|
19
|
-
UI.user_error!("No ipa file given")
|
19
|
+
UI.user_error!("No ipa or pkg file given") if config[:ipa].nil? && config[:pkg].nil?
|
20
20
|
|
21
21
|
check_for_changelog_or_whats_new!(options)
|
22
22
|
|
@@ -25,10 +25,17 @@ module Pilot
|
|
25
25
|
dir = Dir.mktmpdir
|
26
26
|
|
27
27
|
platform = fetch_app_platform
|
28
|
-
|
28
|
+
if options[:ipa]
|
29
|
+
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id,
|
29
30
|
ipa_path: options[:ipa],
|
30
31
|
package_path: dir,
|
31
32
|
platform: platform)
|
33
|
+
else
|
34
|
+
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(app_id: fetch_app_id,
|
35
|
+
pkg_path: options[:pkg],
|
36
|
+
package_path: dir,
|
37
|
+
platform: platform)
|
38
|
+
end
|
32
39
|
|
33
40
|
transporter = transporter_for_selected_team(options)
|
34
41
|
result = transporter.upload(package_path: package_path)
|
@@ -94,6 +101,9 @@ module Pilot
|
|
94
101
|
if config[:ipa]
|
95
102
|
app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
|
96
103
|
app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
|
104
|
+
elsif config[:pkg]
|
105
|
+
app_version = FastlaneCore::PkgFileAnalyser.fetch_app_version(config[:pkg])
|
106
|
+
app_build = FastlaneCore::PkgFileAnalyser.fetch_app_build(config[:pkg])
|
97
107
|
else
|
98
108
|
app_version = config[:app_version]
|
99
109
|
app_build = config[:build_number]
|
@@ -108,7 +118,8 @@ module Pilot
|
|
108
118
|
timeout_duration: config[:wait_processing_timeout_duration],
|
109
119
|
return_when_build_appears: return_when_build_appears,
|
110
120
|
return_spaceship_testflight_build: false,
|
111
|
-
select_latest: config[:distribute_only]
|
121
|
+
select_latest: config[:distribute_only],
|
122
|
+
wait_for_build_beta_detail_processing: true
|
112
123
|
)
|
113
124
|
|
114
125
|
unless latest_build.app_version == app_version && latest_build.version == app_build
|
@@ -558,7 +569,6 @@ module Pilot
|
|
558
569
|
attributes[:autoNotifyEnabled] = info[:auto_notify_enabled] if info.key?(:auto_notify_enabled)
|
559
570
|
build_beta_detail = build.build_beta_detail
|
560
571
|
|
561
|
-
# https://github.com/fastlane/fastlane/pull/16006
|
562
572
|
if build_beta_detail
|
563
573
|
Spaceship::ConnectAPI.patch_build_beta_details(build_beta_details_id: build_beta_detail.id, attributes: attributes)
|
564
574
|
else
|
data/pilot/lib/pilot/manager.rb
CHANGED
@@ -73,7 +73,8 @@ module Pilot
|
|
73
73
|
|
74
74
|
def fetch_app_identifier
|
75
75
|
result = config[:app_identifier]
|
76
|
-
result ||= FastlaneCore::IpaFileAnalyser.fetch_app_identifier(config[:ipa])
|
76
|
+
result ||= FastlaneCore::IpaFileAnalyser.fetch_app_identifier(config[:ipa]) if config[:ipa]
|
77
|
+
result ||= FastlaneCore::PkgFileAnalyser.fetch_app_identifier(config[:pkg]) if config[:pkg]
|
77
78
|
result ||= UI.input("Please enter the app's bundle identifier: ")
|
78
79
|
UI.verbose("App identifier (#{result})")
|
79
80
|
return result
|
@@ -82,6 +83,7 @@ module Pilot
|
|
82
83
|
def fetch_app_platform(required: true)
|
83
84
|
result = config[:app_platform]
|
84
85
|
result ||= FastlaneCore::IpaFileAnalyser.fetch_app_platform(config[:ipa]) if config[:ipa]
|
86
|
+
result ||= FastlaneCore::PkgFileAnalyser.fetch_app_platform(config[:pkg]) if config[:pkg]
|
85
87
|
if required
|
86
88
|
result ||= UI.input("Please enter the app's platform (appletvos, ios, osx): ")
|
87
89
|
UI.user_error!("App Platform must be ios, appletvos, or osx") unless ['ios', 'appletvos', 'osx'].include?(result)
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -48,7 +48,6 @@ module Pilot
|
|
48
48
|
env_name: "PILOT_PLATFORM",
|
49
49
|
description: "The platform to use (optional)",
|
50
50
|
optional: true,
|
51
|
-
default_value: 'ios',
|
52
51
|
verify_block: proc do |value|
|
53
52
|
UI.user_error!("The platform can only be ios, appletvos, or osx") unless ['ios', 'appletvos', 'osx'].include?(value)
|
54
53
|
end),
|
@@ -82,6 +81,26 @@ module Pilot
|
|
82
81
|
value = File.expand_path(value)
|
83
82
|
UI.user_error!("Could not find ipa file at path '#{value}'") unless File.exist?(value)
|
84
83
|
UI.user_error!("'#{value}' doesn't seem to be an ipa file") unless value.end_with?(".ipa")
|
84
|
+
end,
|
85
|
+
conflicting_options: [:pkg],
|
86
|
+
conflict_block: proc do |value|
|
87
|
+
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run.")
|
88
|
+
end),
|
89
|
+
FastlaneCore::ConfigItem.new(key: :pkg,
|
90
|
+
short_option: "-P",
|
91
|
+
optional: true,
|
92
|
+
env_name: "PILOT_PKG",
|
93
|
+
description: "Path to your pkg file",
|
94
|
+
code_gen_sensitive: true,
|
95
|
+
default_value: Dir["*.pkg"].sort_by { |x| File.mtime(x) }.last,
|
96
|
+
default_value_dynamic: true,
|
97
|
+
verify_block: proc do |value|
|
98
|
+
UI.user_error!("Could not find pkg file at path '#{File.expand_path(value)}'") unless File.exist?(value)
|
99
|
+
UI.user_error!("'#{value}' doesn't seem to be a pkg file") unless value.end_with?(".pkg")
|
100
|
+
end,
|
101
|
+
conflicting_options: [:ipa],
|
102
|
+
conflict_block: proc do |value|
|
103
|
+
UI.user_error!("You can't use 'pkg' and '#{value.key}' options in one run.")
|
85
104
|
end),
|
86
105
|
|
87
106
|
# app review info
|
@@ -3,6 +3,7 @@ require 'commander'
|
|
3
3
|
require 'fastlane/version'
|
4
4
|
require 'fastlane_core/ui/help_formatter'
|
5
5
|
require 'fastlane_core/configuration/config_item'
|
6
|
+
require 'fastlane_core/print_table'
|
6
7
|
require_relative 'module'
|
7
8
|
require_relative 'manager'
|
8
9
|
require_relative 'options'
|
@@ -196,6 +197,33 @@ module Produce
|
|
196
197
|
end
|
197
198
|
end
|
198
199
|
|
200
|
+
command :available_services do |c|
|
201
|
+
c.syntax = 'fastlane produce available_services -a APP_IDENTIFIER'
|
202
|
+
c.description = 'Displays a list of allowed Application Services for a specific app.'
|
203
|
+
c.example('Check Available Services', 'fastlane produce available_services -a com.example.app')
|
204
|
+
|
205
|
+
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
|
206
|
+
|
207
|
+
c.action do |args, options|
|
208
|
+
# Filter the options so that we can still build the configuration
|
209
|
+
allowed_keys = Produce::Options.available_options.collect(&:key)
|
210
|
+
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include?(key) })
|
211
|
+
|
212
|
+
require 'produce/service'
|
213
|
+
require 'terminal-table'
|
214
|
+
|
215
|
+
services = Produce::Service.available_services(options, args)
|
216
|
+
rows = services.map { |capabilities| [capabilities.name, capabilities.id, capabilities.description] }
|
217
|
+
table = Terminal::Table.new(
|
218
|
+
title: "Available Services",
|
219
|
+
headings: ['Name', 'ID', 'Description'],
|
220
|
+
rows: FastlaneCore::PrintTable.transform_output(rows),
|
221
|
+
style: { all_separators: true }
|
222
|
+
)
|
223
|
+
puts(table)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
199
227
|
command :group do |c|
|
200
228
|
c.syntax = 'fastlane produce group'
|
201
229
|
c.description = 'Ensure that a specific App Group exists'
|
@@ -16,6 +16,10 @@ module Produce
|
|
16
16
|
self.new.disable(options, args)
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.available_services(options, args)
|
20
|
+
self.new.available_services(options, args)
|
21
|
+
end
|
22
|
+
|
19
23
|
def enable(options, _args)
|
20
24
|
unless bundle_id
|
21
25
|
UI.message("[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist")
|
@@ -40,6 +44,17 @@ module Produce
|
|
40
44
|
UI.success("Done! Disabled #{disabled} services.")
|
41
45
|
end
|
42
46
|
|
47
|
+
def available_services(options, _args)
|
48
|
+
unless bundle_id
|
49
|
+
UI.message("[DevCenter] App '#{Produce.config[:app_identifier]}' does not exist")
|
50
|
+
return
|
51
|
+
end
|
52
|
+
|
53
|
+
UI.success("[DevCenter] App found '#{bundle_id.name}'")
|
54
|
+
UI.message("Fetching available services")
|
55
|
+
return Spaceship::ConnectAPI::Capabilities.all
|
56
|
+
end
|
57
|
+
|
43
58
|
def valid_services_for(options)
|
44
59
|
allowed_keys = [:access_wifi, :app_attest, :app_group, :apple_pay, :associated_domains, :auto_fill_credential, :car_play_audio_app, :car_play_messaging_app,
|
45
60
|
:car_play_navigation_app, :car_play_voip_calling_app, :class_kit, :icloud, :critical_alerts, :custom_network_protocol, :data_protection,
|
@@ -82,7 +97,7 @@ module Produce
|
|
82
97
|
bundle_id.update_capability(ACCESS_WIFI_INFORMATION, enabled: on)
|
83
98
|
end
|
84
99
|
|
85
|
-
if options.
|
100
|
+
if options.app_attest
|
86
101
|
UI.message("\tApp Attest")
|
87
102
|
bundle_id.update_capability(APP_ATTEST, enabled: on)
|
88
103
|
end
|