fastlane 2.189.0 → 2.193.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +92 -92
- 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/app_store_connect_api_key.rb +1 -1
- data/fastlane/lib/fastlane/actions/bundle_install.rb +13 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +25 -1
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +97 -17
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +2 -2
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.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 +86 -21
- 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 +121 -25
- 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 +1 -1
- 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 +9 -9
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +25 -6
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +11 -4
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +1 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -0
- data/match/lib/match/runner.rb +5 -5
- data/match/lib/match/storage/.git_storage.rb.swp +0 -0
- data/match/lib/match/storage/.interface.rb.swp +0 -0
- 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/scan/lib/scan/xcpretty_reporter_options_generator.rb +1 -1
- data/sigh/lib/sigh/options.rb +2 -1
- data/spaceship/lib/spaceship/client.rb +6 -0
- 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/models/user.rb +17 -3
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +26 -5
- 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/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +46 -5
- data/spaceship/lib/spaceship/connect_api/token.rb +4 -1
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +58 -3
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +3 -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 -19
@@ -43,19 +43,19 @@
|
|
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-18-g7d56615",
|
47
|
+
"HOMEBREW_PREFIX": "/opt/homebrew",
|
48
|
+
"Homebrew/homebrew-core": "17ef60082350d5eea95728f146863b767e2257f2",
|
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
|
-
"Xcode": "
|
58
|
+
"Xcode": "13.0",
|
59
59
|
"macOS": "12.0"
|
60
60
|
}
|
61
61
|
}
|
@@ -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)")
|
@@ -7,14 +7,17 @@ module FastlaneCore
|
|
7
7
|
def self.import_file(path, keychain_path, keychain_password: nil, certificate_password: "", skip_set_partition_list: false, output: FastlaneCore::Globals.verbose?)
|
8
8
|
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
9
9
|
|
10
|
+
password_part = " -P #{certificate_password.shellescape}"
|
11
|
+
|
10
12
|
command = "security import #{path.shellescape} -k '#{keychain_path.shellescape}'"
|
11
|
-
command <<
|
13
|
+
command << password_part
|
12
14
|
command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` (before Sierra)
|
13
15
|
command << " -T /usr/bin/security"
|
14
16
|
command << " -T /usr/bin/productbuild" # to not be asked for permission when using an installer cert for macOS
|
15
17
|
command << " 1> /dev/null" unless output
|
16
18
|
|
17
|
-
|
19
|
+
sensitive_command = command.gsub(password_part, " -P ********")
|
20
|
+
UI.command(sensitive_command) if output
|
18
21
|
Open3.popen3(command) do |stdin, stdout, stderr, thrd|
|
19
22
|
UI.command_output(stdout.read.to_s) if output
|
20
23
|
|
@@ -38,17 +41,21 @@ module FastlaneCore
|
|
38
41
|
# When security supports partition lists, also add the partition IDs
|
39
42
|
# See https://openradar.appspot.com/28524119
|
40
43
|
if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
|
44
|
+
password_part = " -k #{keychain_password.to_s.shellescape}"
|
45
|
+
|
41
46
|
command = "security set-key-partition-list"
|
42
47
|
command << " -S apple-tool:,apple:,codesign:"
|
43
48
|
command << " -s" # This is a needed in Catalina to prevent "security: SecKeychainItemCopyAccess: A missing value was detected."
|
44
|
-
command <<
|
49
|
+
command << password_part
|
45
50
|
command << " #{keychain_path.shellescape}"
|
46
51
|
command << " 1> /dev/null" # always disable stdout. This can be very verbose, and leak potentially sensitive info
|
47
52
|
|
48
53
|
# Showing loading indicator as this can take some time if a lot of keys installed
|
49
54
|
Helper.show_loading_indicator("Setting key partition list... (this can take a minute if there are a lot of keys installed)")
|
50
55
|
|
51
|
-
|
56
|
+
# Strip keychain password from command output
|
57
|
+
sensitive_command = command.gsub(password_part, " -k ********")
|
58
|
+
UI.command(sensitive_command) if output
|
52
59
|
Open3.popen3(command) do |stdin, stdout, stderr, thrd|
|
53
60
|
unless thrd.value.success?
|
54
61
|
err = stderr.read.to_s.strip
|
@@ -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/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
|
Binary file
|
Binary file
|
@@ -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'
|