fastlane 2.173.0 → 2.178.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 +82 -82
- data/cert/lib/cert/options.rb +2 -2
- data/cert/lib/cert/runner.rb +1 -1
- data/deliver/lib/deliver/app_screenshot.rb +6 -2
- data/deliver/lib/deliver/options.rb +2 -2
- data/deliver/lib/deliver/runner.rb +8 -4
- data/deliver/lib/deliver/upload_metadata.rb +3 -3
- data/deliver/lib/deliver/upload_screenshots.rb +12 -11
- data/fastlane/lib/fastlane/actions/adb.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +3 -3
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +6 -2
- data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
- data/fastlane/lib/fastlane/actions/appetize.rb +13 -1
- data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +10 -2
- data/fastlane/lib/fastlane/actions/carthage.rb +22 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +15 -1
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +11 -1
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +5 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +5 -15
- data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
- data/fastlane/lib/fastlane/actions/git_commit.rb +1 -1
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -1
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -1
- data/fastlane/lib/fastlane/actions/jazzy.rb +10 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +1 -2
- data/fastlane/lib/fastlane/actions/register_device.rb +3 -3
- data/fastlane/lib/fastlane/actions/register_devices.rb +3 -3
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -3
- data/fastlane/lib/fastlane/actions/swiftlint.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -1
- data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
- data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
- data/fastlane/lib/fastlane/fast_file.rb +9 -5
- data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +71 -27
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +1 -1
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +2 -2
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +9 -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/SocketClient.swift +1 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +20 -14
- data/fastlane/swift/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +23 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +9 -5
- data/fastlane_core/lib/fastlane_core/helper.rb +26 -5
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/project.rb +23 -20
- data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +2 -2
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
- data/gym/lib/gym/.runner.rb.swp +0 -0
- data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
- data/match/lib/match/importer.rb +1 -1
- data/match/lib/match/migrate.rb +1 -1
- data/match/lib/match/nuke.rb +6 -1
- data/match/lib/match/options.rb +2 -2
- data/match/lib/match/runner.rb +1 -1
- data/match/lib/match/storage/google_cloud_storage.rb +1 -1
- data/match/lib/match/storage/s3_storage.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +25 -8
- data/pilot/lib/pilot/manager.rb +1 -1
- data/pilot/lib/pilot/options.rb +5 -5
- data/precheck/lib/precheck/options.rb +2 -2
- data/precheck/lib/precheck/runner.rb +2 -2
- data/scan/lib/scan/detect_values.rb +4 -1
- data/scan/lib/scan/options.rb +10 -0
- data/scan/lib/scan/runner.rb +27 -0
- data/screengrab/lib/screengrab/android_environment.rb +2 -2
- data/screengrab/lib/screengrab/runner.rb +1 -2
- data/sigh/lib/sigh/download_all.rb +1 -1
- data/sigh/lib/sigh/options.rb +2 -2
- data/sigh/lib/sigh/runner.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
- data/spaceship/README.md +2 -2
- data/spaceship/lib/spaceship/client.rb +18 -17
- data/spaceship/lib/spaceship/connect_api/api_client.rb +40 -7
- data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +26 -4
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
- data/spaceship/lib/spaceship/playground.rb +2 -2
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +42 -29
- metadata +38 -22
data/fastlane/swift/Runner.swift
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// Runner.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2021 FastlaneTools
|
3
3
|
|
4
4
|
//
|
5
5
|
// ** NOTE **
|
@@ -140,7 +140,7 @@ extension Runner {
|
|
140
140
|
dispatchGroup.leave()
|
141
141
|
}
|
142
142
|
|
143
|
-
|
143
|
+
private func testDispatchTimeoutResult(_ timeoutResult: DispatchTimeoutResult, failureMessage: String, timeToWait _: DispatchTimeInterval) -> Bool {
|
144
144
|
switch timeoutResult {
|
145
145
|
case .success:
|
146
146
|
return true
|
@@ -20,6 +20,9 @@ public protocol ScanfileProtocol: class {
|
|
20
20
|
/// Should skip auto detecting of devices if none were specified
|
21
21
|
var skipDetectDevices: Bool { get }
|
22
22
|
|
23
|
+
/// Should fail if devices not found
|
24
|
+
var ensureDevicesFound: Bool { get }
|
25
|
+
|
23
26
|
/// Enabling this option will automatically killall Simulator processes before the run
|
24
27
|
var forceQuitSimulator: Bool { get }
|
25
28
|
|
@@ -110,6 +113,9 @@ public protocol ScanfileProtocol: class {
|
|
110
113
|
/// Should zip the derived data build products and place in output path?
|
111
114
|
var shouldZipBuildProducts: Bool { get }
|
112
115
|
|
116
|
+
/// Should provide additional copy of .xctestrun file (settings.xctestrun) and place in output path?
|
117
|
+
var outputXctestrun: Bool { get }
|
118
|
+
|
113
119
|
/// Should an Xcode result bundle be generated in the output directory
|
114
120
|
var resultBundle: Bool { get }
|
115
121
|
|
@@ -214,6 +220,7 @@ public extension ScanfileProtocol {
|
|
214
220
|
var device: String? { return nil }
|
215
221
|
var devices: [String]? { return nil }
|
216
222
|
var skipDetectDevices: Bool { return false }
|
223
|
+
var ensureDevicesFound: Bool { return false }
|
217
224
|
var forceQuitSimulator: Bool { return false }
|
218
225
|
var resetSimulator: Bool { return false }
|
219
226
|
var disableSlideToType: Bool { return true }
|
@@ -244,6 +251,7 @@ public extension ScanfileProtocol {
|
|
244
251
|
var xcprettyArgs: String? { return nil }
|
245
252
|
var derivedDataPath: String? { return nil }
|
246
253
|
var shouldZipBuildProducts: Bool { return false }
|
254
|
+
var outputXctestrun: Bool { return false }
|
247
255
|
var resultBundle: Bool { return false }
|
248
256
|
var useClangReportName: Bool { return false }
|
249
257
|
var concurrentWorkers: Int? { return nil }
|
@@ -280,4 +288,4 @@ public extension ScanfileProtocol {
|
|
280
288
|
|
281
289
|
// Please don't remove the lines below
|
282
290
|
// They are used to detect outdated files
|
283
|
-
// FastlaneRunnerAPIVersion [0.9.
|
291
|
+
// FastlaneRunnerAPIVersion [0.9.69]
|
@@ -2,22 +2,28 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.47.12",
|
6
6
|
"bottle": {
|
7
|
+
"rebuild": 0,
|
7
8
|
"cellar": ":any_skip_relocation",
|
8
9
|
"prefix": "/usr/local",
|
10
|
+
"root_url": "https://homebrew.bintray.com/bottles",
|
9
11
|
"files": {
|
12
|
+
"arm64_big_sur": {
|
13
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.arm64_big_sur.bottle.tar.gz",
|
14
|
+
"sha256": "334b736f7c78b1bc48882f55558e79571be591281462bc91dedea6dac10034be"
|
15
|
+
},
|
16
|
+
"big_sur": {
|
17
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.big_sur.bottle.tar.gz",
|
18
|
+
"sha256": "b7ba5043f29c548dd05374125faa61dd07690bffe373890cb608609e4a7e2413"
|
19
|
+
},
|
10
20
|
"catalina": {
|
11
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.
|
12
|
-
"sha256": "
|
21
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.catalina.bottle.tar.gz",
|
22
|
+
"sha256": "030b2e18168f5680c4ee387812b14057c4cb148b6f6800b983b1b298f4af15b1"
|
13
23
|
},
|
14
24
|
"mojave": {
|
15
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.
|
16
|
-
"sha256": "
|
17
|
-
},
|
18
|
-
"high_sierra": {
|
19
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.45.6.high_sierra.bottle.tar.gz",
|
20
|
-
"sha256": "34d900217ca12736a112c31e54a5f4f7e64c1fe224f6e4ea76ad1d25b149f647"
|
25
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.mojave.bottle.tar.gz",
|
26
|
+
"sha256": "b3e35821d3094d08eb9f8423ce7d18cb5462bb5b1d02a3156ed1a10f6539709a"
|
21
27
|
}
|
22
28
|
}
|
23
29
|
}
|
@@ -27,12 +33,12 @@
|
|
27
33
|
"system": {
|
28
34
|
"macos": {
|
29
35
|
"catalina": {
|
30
|
-
"HOMEBREW_VERSION": "
|
36
|
+
"HOMEBREW_VERSION": "3.0.4-64-g31a4989",
|
31
37
|
"HOMEBREW_PREFIX": "/usr/local",
|
32
|
-
"Homebrew/homebrew-core": "
|
33
|
-
"CLT": "11.0.
|
34
|
-
"Xcode": "
|
35
|
-
"macOS": "10.15.
|
38
|
+
"Homebrew/homebrew-core": "443ddf805144323198a5b37b071516534243377b",
|
39
|
+
"CLT": "11.0.33.12",
|
40
|
+
"Xcode": "12.2",
|
41
|
+
"macOS": "10.15.7"
|
36
42
|
},
|
37
43
|
"big_sur": {
|
38
44
|
"HOMEBREW_VERSION": "2.4.13-249-g6454504",
|
data/fastlane/swift/main.swift
CHANGED
@@ -35,6 +35,7 @@ require_relative 'fastlane_core/analytics/analytics_ingester_client'
|
|
35
35
|
require_relative 'fastlane_core/analytics/analytics_session'
|
36
36
|
require_relative 'fastlane_core/tag_version'
|
37
37
|
require_relative 'fastlane_core/fastlane_pty'
|
38
|
+
require_relative 'fastlane_core/queue_worker'
|
38
39
|
|
39
40
|
# Third Party code
|
40
41
|
require 'colored'
|
@@ -13,16 +13,10 @@ module FastlaneCore
|
|
13
13
|
#
|
14
14
|
# Derived from https://stackoverflow.com/a/5471032/3005
|
15
15
|
def which(cmd)
|
16
|
-
# PATHEXT contains the list of file extensions that Windows considers executable, semicolon separated.
|
17
|
-
# e.g. ".COM;.EXE;.BAT;.CMD"
|
18
|
-
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : []
|
19
|
-
exts << '' # Always have an empty string (= no file extension)
|
20
|
-
|
21
16
|
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
17
|
+
cmd_path = File.join(path, cmd)
|
18
|
+
executable_path = Helper.get_executable_path(cmd_path)
|
19
|
+
return executable_path if Helper.executable?(executable_path)
|
26
20
|
end
|
27
21
|
|
28
22
|
return nil
|
@@ -67,7 +67,7 @@ module FastlaneCore
|
|
67
67
|
long_switch = "--#{option.key} #{value_appendix}"
|
68
68
|
|
69
69
|
description = option.description
|
70
|
-
description += " (#{option.
|
70
|
+
description += " (#{option.env_names.join(', ')})" unless option.env_names.empty?
|
71
71
|
|
72
72
|
# We compact this array here to remove the short_switch variable if it is nil.
|
73
73
|
# Passing a nil value to global_option has been shown to create problems with
|
@@ -12,6 +12,9 @@ module FastlaneCore
|
|
12
12
|
# [String] the name of the environment variable, which is only used if no other values were found
|
13
13
|
attr_accessor :env_name
|
14
14
|
|
15
|
+
# [Array] the names of the environment variables, which is only used if no other values were found
|
16
|
+
attr_accessor :env_names
|
17
|
+
|
15
18
|
# [String] A description shown to the user
|
16
19
|
attr_accessor :description
|
17
20
|
|
@@ -71,6 +74,7 @@ module FastlaneCore
|
|
71
74
|
# Creates a new option
|
72
75
|
# @param key (Symbol) the key which is used as command parameters or key in the fastlane tools
|
73
76
|
# @param env_name (String) the name of the environment variable, which is only used if no other values were found
|
77
|
+
# @param env_names (Array) the names of the environment variables, which is only used if no other values were found
|
74
78
|
# @param description (String) A description shown to the user
|
75
79
|
# @param short_option (String) A string of length 1 which is used for the command parameters (e.g. -f)
|
76
80
|
# @param default_value the value which is used if there was no given values and no environment values
|
@@ -88,8 +92,10 @@ module FastlaneCore
|
|
88
92
|
# @param sensitive (Boolean) Set if the variable is sensitive, such as a password or API token, to prevent echoing when prompted for the parameter
|
89
93
|
# @param display_in_shell (Boolean) Set if the variable can be used from shell
|
90
94
|
# rubocop:disable Metrics/ParameterLists
|
95
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
91
96
|
def initialize(key: nil,
|
92
97
|
env_name: nil,
|
98
|
+
env_names: nil,
|
93
99
|
description: nil,
|
94
100
|
short_option: nil,
|
95
101
|
default_value: nil,
|
@@ -109,6 +115,11 @@ module FastlaneCore
|
|
109
115
|
UI.user_error!("key must be a symbol") unless key.kind_of?(Symbol)
|
110
116
|
UI.user_error!("env_name must be a String") unless (env_name || '').kind_of?(String)
|
111
117
|
|
118
|
+
UI.user_error!("env_names must be an Array") unless (env_names || []).kind_of?(Array)
|
119
|
+
(env_names || []).each do |name|
|
120
|
+
UI.user_error!("env_names must only contain String") unless (name || '').kind_of?(String)
|
121
|
+
end
|
122
|
+
|
112
123
|
if short_option
|
113
124
|
UI.user_error!("short_option for key :#{key} must of type String") unless short_option.kind_of?(String)
|
114
125
|
UI.user_error!("short_option for key :#{key} must be a string of length 1") unless short_option.delete('-').length == 1
|
@@ -138,6 +149,7 @@ module FastlaneCore
|
|
138
149
|
|
139
150
|
@key = key
|
140
151
|
@env_name = env_name
|
152
|
+
@env_names = [env_name].compact + (env_names || [])
|
141
153
|
@description = description
|
142
154
|
@short_option = short_option
|
143
155
|
@default_value = default_value
|
@@ -160,6 +172,7 @@ module FastlaneCore
|
|
160
172
|
|
161
173
|
update_code_gen_default_value_if_able!
|
162
174
|
end
|
175
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
163
176
|
# rubocop:enable Metrics/ParameterLists
|
164
177
|
|
165
178
|
# if code_gen_default_value is nil, use the default value if it isn't a `code_gen_sensitive` value
|
@@ -228,6 +241,16 @@ module FastlaneCore
|
|
228
241
|
true
|
229
242
|
end
|
230
243
|
|
244
|
+
def fetch_env_value
|
245
|
+
env_names.each do |name|
|
246
|
+
next if ENV[name].nil?
|
247
|
+
# verify! before using (see https://github.com/fastlane/fastlane/issues/14449)
|
248
|
+
return ENV[name].dup if verify!(auto_convert_value(ENV[name]))
|
249
|
+
end
|
250
|
+
|
251
|
+
return nil
|
252
|
+
end
|
253
|
+
|
231
254
|
# rubocop:disable Metrics/PerceivedComplexity
|
232
255
|
# Returns an updated value type (if necessary)
|
233
256
|
def auto_convert_value(value)
|
@@ -209,7 +209,6 @@ module FastlaneCore
|
|
209
209
|
|
210
210
|
# Returns the value for a certain key. fastlane_core tries to fetch the value from different sources
|
211
211
|
# if 'ask' is true and the value is not present, the user will be prompted to provide a value
|
212
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
213
212
|
def fetch(key, ask: true)
|
214
213
|
UI.crash!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
|
215
214
|
|
@@ -218,9 +217,8 @@ module FastlaneCore
|
|
218
217
|
# Same order as https://docs.fastlane.tools/advanced/#priorities-of-parameters-and-options
|
219
218
|
value = if @values.key?(key) && !@values[key].nil?
|
220
219
|
@values[key]
|
221
|
-
elsif
|
222
|
-
|
223
|
-
ENV[option.env_name].dup if option.verify!(option.auto_convert_value(ENV[option.env_name]))
|
220
|
+
elsif (env_value = option.fetch_env_value)
|
221
|
+
env_value
|
224
222
|
elsif self.config_file_options.key?(key)
|
225
223
|
self.config_file_options[key]
|
226
224
|
else
|
@@ -243,11 +241,17 @@ module FastlaneCore
|
|
243
241
|
while value.nil?
|
244
242
|
UI.important("To not be asked about this value, you can specify it using '#{option.key}'") if ENV["FASTLANE_ONBOARDING_IN_PROCESS"].to_s.length == 0
|
245
243
|
value = option.sensitive ? UI.password("#{option.description}: ") : UI.input("#{option.description}: ")
|
244
|
+
|
245
|
+
# ConfigItem allows to specify a type for the item but UI.password and
|
246
|
+
# UI.input return String values. Try to convert the String input to
|
247
|
+
# the option's type before passing it along.
|
248
|
+
value = option.auto_convert_value(value)
|
249
|
+
|
246
250
|
# Also store this value to use it from now on
|
247
251
|
begin
|
248
252
|
set(key, value)
|
249
253
|
rescue => ex
|
250
|
-
|
254
|
+
UI.error(ex)
|
251
255
|
value = nil
|
252
256
|
end
|
253
257
|
end
|
@@ -368,8 +368,29 @@ module FastlaneCore
|
|
368
368
|
|
369
369
|
# checks if a given path is an executable file
|
370
370
|
def self.executable?(cmd_path)
|
371
|
-
|
372
|
-
|
371
|
+
if !cmd_path || File.directory?(cmd_path)
|
372
|
+
return false
|
373
|
+
end
|
374
|
+
|
375
|
+
return File.exist?(get_executable_path(cmd_path))
|
376
|
+
end
|
377
|
+
|
378
|
+
# returns the path of the executable with the correct extension on Windows
|
379
|
+
def self.get_executable_path(cmd_path)
|
380
|
+
if self.windows?
|
381
|
+
# PATHEXT contains the list of file extensions that Windows considers executable, semicolon separated.
|
382
|
+
# e.g. ".COM;.EXE;.BAT;.CMD"
|
383
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : []
|
384
|
+
|
385
|
+
# no executable files on Windows, so existing is enough there
|
386
|
+
# also check if command + ext is present
|
387
|
+
exts.each do |ext|
|
388
|
+
executable_path = "#{cmd_path}#{ext.downcase}"
|
389
|
+
return executable_path if File.exist?(executable_path)
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
return cmd_path
|
373
394
|
end
|
374
395
|
|
375
396
|
# checks if given file is a valid json file
|
@@ -425,20 +446,20 @@ module FastlaneCore
|
|
425
446
|
UI.current.log
|
426
447
|
end
|
427
448
|
|
428
|
-
def self.ask_password(message: "Passphrase: ", confirm: nil)
|
449
|
+
def self.ask_password(message: "Passphrase: ", confirm: nil, confirmation_message: "Type passphrase again: ")
|
429
450
|
raise "This code should only run in interactive mode" unless UI.interactive?
|
430
451
|
|
431
452
|
loop do
|
432
453
|
password = UI.password(message)
|
433
454
|
if confirm
|
434
|
-
password2 = UI.password(
|
455
|
+
password2 = UI.password(confirmation_message)
|
435
456
|
if password == password2
|
436
457
|
return password
|
437
458
|
end
|
438
459
|
else
|
439
460
|
return password
|
440
461
|
end
|
441
|
-
UI.error("
|
462
|
+
UI.error("Your entries do not match. Please try again")
|
442
463
|
end
|
443
464
|
end
|
444
465
|
end
|