fastlane 2.240.0 → 2.241.0
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 +57 -177
- data/bin/fastlane +4 -2
- data/credentials_manager/README.md +1 -1
- data/credentials_manager/lib/credentials_manager/account_manager.rb +6 -2
- data/deliver/lib/deliver/app_screenshot.rb +0 -4
- data/deliver/lib/deliver/commands_generator.rb +1 -1
- data/deliver/lib/deliver/detect_values.rb +3 -1
- data/deliver/lib/deliver/download_screenshots.rb +8 -1
- data/deliver/lib/deliver/sync_screenshots.rb +27 -28
- data/deliver/lib/deliver/upload_app_clip_default_experience_header_images.rb +3 -3
- data/deliver/lib/deliver/upload_metadata.rb +12 -16
- data/deliver/lib/deliver/upload_screenshots.rb +12 -14
- data/docs/README.md +25 -0
- data/fastlane/lib/assets/TeamTable.md.erb +28 -0
- data/fastlane/lib/fastlane/actions/appaloosa.rb +2 -1
- data/fastlane/lib/fastlane/actions/appium.rb +1 -1
- data/fastlane/lib/fastlane/actions/apteligent.rb +8 -1
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +1 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +3 -0
- data/fastlane/lib/fastlane/actions/danger.rb +5 -5
- data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -2
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -2
- data/fastlane/lib/fastlane/actions/docs/get_certificates.md +0 -2
- data/fastlane/lib/fastlane/actions/docs/get_push_certificate.md +1 -3
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +13 -3
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +2 -2
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +1 -2
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +16 -6
- data/fastlane/lib/fastlane/actions/lcov.rb +9 -2
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +16 -4
- data/fastlane/lib/fastlane/actions/notification.rb +3 -2
- data/fastlane/lib/fastlane/actions/oclint.rb +8 -8
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -4
- data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
- data/fastlane/lib/fastlane/actions/say.rb +2 -4
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
- data/fastlane/lib/fastlane/actions/sonar.rb +16 -16
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +8 -8
- data/fastlane/lib/fastlane/actions/splunkmint.rb +8 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -2
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -2
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -4
- data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +3 -1
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +20 -19
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -6
- data/fastlane/lib/fastlane/actions/zip.rb +2 -1
- data/fastlane/lib/fastlane/auto_complete.rb +1 -1
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +14 -0
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +23 -0
- data/fastlane/lib/fastlane/environment_printer.rb +12 -25
- data/fastlane/lib/fastlane/fast_file.rb +2 -1
- data/fastlane/lib/fastlane/fastlane_require.rb +5 -1
- data/fastlane/lib/fastlane/helper/sh_helper.rb +16 -6
- data/fastlane/lib/fastlane/new_action.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +36 -4
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -7
- data/fastlane/lib/fastlane/swift_lane_manager.rb +22 -4
- data/fastlane/lib/fastlane/version.rb +3 -2
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +55 -9
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/MainProcess.swift +190 -20
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +10 -3
- 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 +8 -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/Rakefile +1 -0
- data/fastlane/swift/main.swift +4 -1
- data/fastlane_core/README.md +1 -1
- data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +1 -17
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +23 -8
- data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -2
- data/fastlane_core/lib/fastlane_core/helper.rb +34 -5
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +0 -14
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +31 -28
- data/fastlane_core/lib/fastlane_core/languages.rb +0 -1
- data/fastlane_core/lib/fastlane_core/print_table.rb +5 -2
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +10 -19
- data/fastlane_core/lib/fastlane_core/secrets.rb +77 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +3 -3
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +2 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/frameit/lib/frameit/device.rb +1 -1
- data/frameit/lib/frameit/frame_downloader.rb +2 -0
- data/frameit/lib/frameit/runner.rb +3 -2
- data/frameit/lib/frameit/screenshot.rb +0 -1
- data/gym/lib/gym/generators/build_command_generator.rb +4 -4
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +3 -3
- data/gym/lib/gym/runner.rb +1 -1
- data/internal/README.md +1 -1
- data/match/lib/match/encryption/openssl.rb +6 -2
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/options.rb +13 -5
- data/match/lib/match/runner.rb +30 -3
- data/match/lib/match/storage/git_storage.rb +43 -7
- data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
- data/match/lib/match/storage/interface.rb +8 -5
- data/pem/lib/pem/module.rb +0 -4
- data/precheck/lib/precheck/rule_processor.rb +1 -0
- data/produce/lib/produce/developer_center.rb +49 -2
- data/produce/lib/produce/itunes_connect.rb +1 -1
- data/produce/lib/produce/module.rb +21 -0
- data/produce/lib/produce/options.rb +17 -0
- data/produce/lib/produce/service.rb +3 -5
- data/produce/lib/produce.rb +0 -1
- data/scan/lib/scan/options.rb +7 -0
- data/scan/lib/scan/runner.rb +1 -1
- data/scan/lib/scan/test_command_generator.rb +12 -9
- data/scan/lib/scan/test_result_parser.rb +1 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +2 -2
- data/screengrab/lib/screengrab/page.html.erb +12 -7
- data/screengrab/lib/screengrab/reports_generator.rb +1 -1
- data/sigh/lib/assets/resign.sh +17 -0
- data/sigh/lib/sigh/local_manage.rb +1 -1
- data/sigh/lib/sigh/options.rb +5 -0
- data/sigh/lib/sigh/resign.rb +3 -3
- data/sigh/lib/sigh/runner.rb +6 -1
- data/snapshot/lib/snapshot/page.html.erb +17 -12
- data/snapshot/lib/snapshot/reports_generator.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
- data/snapshot/lib/snapshot.rb +0 -2
- data/spaceship/README.md +2 -3
- data/spaceship/lib/spaceship/base.rb +3 -1
- data/spaceship/lib/spaceship/client.rb +65 -47
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +13 -2
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +7 -5
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +25 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +1 -1
- data/spaceship/lib/spaceship/errors.rb +7 -1
- data/spaceship/lib/spaceship/globals.rb +2 -2
- data/spaceship/lib/spaceship/portal/merchant.rb +127 -2
- data/spaceship/lib/spaceship/portal/portal_client.rb +58 -0
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +0 -2
- data/spaceship/lib/spaceship/portal/website_push.rb +8 -2
- data/spaceship/lib/spaceship/test_flight/client.rb +0 -22
- data/spaceship/lib/spaceship/test_flight.rb +0 -1
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -0
- data/supply/lib/supply/options.rb +1 -0
- data/supply/lib/supply.rb +0 -1
- metadata +75 -43
- data/produce/lib/produce/available_default_languages.rb +0 -62
- data/snapshot/lib/snapshot/screenshot_flatten.rb +0 -20
- data/snapshot/lib/snapshot/screenshot_rotate.rb +0 -36
- data/spaceship/lib/spaceship/test_flight/app_test_info.rb +0 -40
- data/supply/lib/supply/apk_listing.rb +0 -14
- /data/fastlane/lib/assets/{custom_action_template.rb → custom_action_template.rb.template} +0 -0
|
@@ -56,10 +56,10 @@ public protocol MatchfileProtocol: AnyObject {
|
|
|
56
56
|
/// Clone just the branch specified, instead of the whole repo. This requires that the branch already exists. Otherwise the command will fail
|
|
57
57
|
var cloneBranchDirectly: Bool { get }
|
|
58
58
|
|
|
59
|
-
/// Use a basic authorization header to access the git repo (e.g.: access via HTTPS, GitHub Actions, etc), usually a string in Base64
|
|
59
|
+
/// Use a basic authorization header to access the git repo (e.g.: access via HTTPS, GitHub Actions, etc), usually a string in Base64. Needs git 2.31 or later
|
|
60
60
|
var gitBasicAuthorization: String? { get }
|
|
61
61
|
|
|
62
|
-
/// Use a bearer authorization header to access the git repo (e.g.: access to an Azure DevOps repository), usually a string in Base64
|
|
62
|
+
/// Use a bearer authorization header to access the git repo (e.g.: access to an Azure DevOps repository), usually a string in Base64. Needs git 2.31 or later
|
|
63
63
|
var gitBearerAuthorization: String? { get }
|
|
64
64
|
|
|
65
65
|
/// Use a private key to access the git repo (e.g.: access to GitHub repository via Deploy keys), usually a id_rsa named file or the contents hereof
|
|
@@ -173,6 +173,9 @@ public protocol MatchfileProtocol: AnyObject {
|
|
|
173
173
|
/// Force encryption to use legacy cbc algorithm for backwards compatibility with older match versions
|
|
174
174
|
var forceLegacyEncryption: Bool { get }
|
|
175
175
|
|
|
176
|
+
/// Enable profile with 'Offline Support' (7 day validity). Requires Apple ID login, not supported with App Store Connect API key authentication
|
|
177
|
+
var offlineProfile: Bool { get }
|
|
178
|
+
|
|
176
179
|
/// Print out extra information and all commands
|
|
177
180
|
var verbose: Bool { get }
|
|
178
181
|
}
|
|
@@ -406,6 +409,10 @@ public extension MatchfileProtocol {
|
|
|
406
409
|
return false
|
|
407
410
|
}
|
|
408
411
|
|
|
412
|
+
var offlineProfile: Bool {
|
|
413
|
+
return false
|
|
414
|
+
}
|
|
415
|
+
|
|
409
416
|
var verbose: Bool {
|
|
410
417
|
return false
|
|
411
418
|
}
|
|
@@ -413,4 +420,4 @@ public extension MatchfileProtocol {
|
|
|
413
420
|
|
|
414
421
|
// Please don't remove the lines below
|
|
415
422
|
// They are used to detect outdated files
|
|
416
|
-
// FastlaneRunnerAPIVersion [0.9.
|
|
423
|
+
// FastlaneRunnerAPIVersion [0.9.153]
|
|
@@ -77,6 +77,9 @@ public protocol ScanfileProtocol: AnyObject {
|
|
|
77
77
|
/// Should the thread sanitizer be turned on?
|
|
78
78
|
var threadSanitizer: Bool? { get }
|
|
79
79
|
|
|
80
|
+
/// Whether verbose and long-running diagnostics (like sysdiagnoses or log archives) are collected when testing. Valid values are: on-failure or never. If not specified, the value in the test plan is used. Equivalent to -collect-test-diagnostics (Xcode 14 and up)
|
|
81
|
+
var collectTestDiagnostics: String? { get }
|
|
82
|
+
|
|
80
83
|
/// Should the HTML report be opened when tests are completed?
|
|
81
84
|
var openReport: Bool { get }
|
|
82
85
|
|
|
@@ -353,6 +356,10 @@ public extension ScanfileProtocol {
|
|
|
353
356
|
return nil
|
|
354
357
|
}
|
|
355
358
|
|
|
359
|
+
var collectTestDiagnostics: String? {
|
|
360
|
+
return nil
|
|
361
|
+
}
|
|
362
|
+
|
|
356
363
|
var openReport: Bool {
|
|
357
364
|
return false
|
|
358
365
|
}
|
|
@@ -588,4 +595,4 @@ public extension ScanfileProtocol {
|
|
|
588
595
|
|
|
589
596
|
// Please don't remove the lines below
|
|
590
597
|
// They are used to detect outdated files
|
|
591
|
-
// FastlaneRunnerAPIVersion [0.9.
|
|
598
|
+
// FastlaneRunnerAPIVersion [0.9.164]
|
|
@@ -14,5 +14,6 @@ end
|
|
|
14
14
|
task(:lint) do
|
|
15
15
|
Dir.chdir('..') do
|
|
16
16
|
sh("swiftformat . --config formatting/.swiftformat --verbose --selfrequired waitWithPolling --exclude Fastfile.swift --swiftversion 4.0")
|
|
17
|
+
sh("swiftformat ../spec/swift --config formatting/.swiftformat --verbose --swiftversion 4.0")
|
|
17
18
|
end
|
|
18
19
|
end
|
data/fastlane/swift/main.swift
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
import Foundation
|
|
12
12
|
|
|
13
13
|
let argumentProcessor = ArgumentProcessor(args: CommandLine.arguments)
|
|
14
|
+
/// fastlane reads this from the built runner, to tell whether it is outdated. Increase it when the runner changes how it talks to fastlane.
|
|
15
|
+
let runnerProtocolVersion = "FastlaneRunnerProtocolVersion [1]"
|
|
16
|
+
verbose(message: runnerProtocolVersion)
|
|
14
17
|
let timeout = argumentProcessor.commandTimeout
|
|
15
18
|
|
|
16
19
|
class MainProcess {
|
|
@@ -44,4 +47,4 @@ while !process.doneRunningLane, RunLoop.current.run(mode: RunLoopMode.defaultRun
|
|
|
44
47
|
|
|
45
48
|
// Please don't remove the lines below
|
|
46
49
|
// They are used to detect outdated files
|
|
47
|
-
// FastlaneRunnerAPIVersion [0.9.
|
|
50
|
+
// FastlaneRunnerAPIVersion [0.9.3]
|
data/fastlane_core/README.md
CHANGED
|
@@ -72,7 +72,7 @@ UI.deprecated("The '--key' parameter is deprecated")
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
# Code of Conduct
|
|
75
|
-
Help us keep _fastlane_ open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
|
|
75
|
+
Help us keep _fastlane_ open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/docs/CODE_OF_CONDUCT.md).
|
|
76
76
|
|
|
77
77
|
# License
|
|
78
78
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
|
@@ -21,7 +21,7 @@ module FastlaneCore
|
|
|
21
21
|
params: {
|
|
22
22
|
fastlane_client_language: @fastlane_client_language,
|
|
23
23
|
fastlane_version: Fastlane::VERSION,
|
|
24
|
-
install_method: install_method,
|
|
24
|
+
install_method: Helper.install_method,
|
|
25
25
|
ruby_version: RUBY_VERSION,
|
|
26
26
|
operating_system: Helper.operating_system,
|
|
27
27
|
build_tool_version: @build_tool_version,
|
|
@@ -29,21 +29,5 @@ module FastlaneCore
|
|
|
29
29
|
}.reject { |_, value| value.nil? }
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
|
-
|
|
33
|
-
private
|
|
34
|
-
|
|
35
|
-
def install_method
|
|
36
|
-
if Helper.bundler?
|
|
37
|
-
'bundler'
|
|
38
|
-
elsif Helper.contained_fastlane?
|
|
39
|
-
'standalone'
|
|
40
|
-
elsif Helper.homebrew?
|
|
41
|
-
'homebrew'
|
|
42
|
-
elsif Helper.mac_app?
|
|
43
|
-
'mac_app'
|
|
44
|
-
else
|
|
45
|
-
'gem'
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
32
|
end
|
|
49
33
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require_relative '../helper'
|
|
2
2
|
require_relative '../globals'
|
|
3
|
+
require_relative '../secrets'
|
|
3
4
|
require_relative 'config_item'
|
|
4
5
|
require_relative 'commander_generator'
|
|
5
6
|
require_relative 'configuration_file'
|
|
@@ -53,16 +54,17 @@ module FastlaneCore
|
|
|
53
54
|
# used for pushing and popping values to provide nesting configuration contexts
|
|
54
55
|
@values_stack = []
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
verify_input_types
|
|
58
|
+
|
|
59
|
+
@available_options.each do |element|
|
|
60
|
+
next unless element.sensitive
|
|
61
|
+
|
|
62
|
+
Secrets.register(@values[element.key], name: element.key)
|
|
63
|
+
# if we are in captured output mode - keep a array of sensitive option values
|
|
64
|
+
# those will be later - replaced by ####
|
|
65
|
+
self.class.sensitive_strings << @values[element.key] if FastlaneCore::Globals.capture_output?
|
|
63
66
|
end
|
|
64
67
|
|
|
65
|
-
verify_input_types
|
|
66
68
|
verify_value_exists
|
|
67
69
|
verify_no_duplicates
|
|
68
70
|
verify_conflicts
|
|
@@ -229,6 +231,7 @@ module FastlaneCore
|
|
|
229
231
|
|
|
230
232
|
value = option.auto_convert_value(value)
|
|
231
233
|
value = nil if value.nil? && !option.string? # by default boolean flags are false
|
|
234
|
+
Secrets.register(value, name: option.key) if option.sensitive
|
|
232
235
|
return value unless value.nil? && (!option.optional || force_ask) && ask
|
|
233
236
|
|
|
234
237
|
# fallback to asking
|
|
@@ -267,6 +270,18 @@ module FastlaneCore
|
|
|
267
270
|
end
|
|
268
271
|
# rubocop:enable Metrics/PerceivedComplexity
|
|
269
272
|
|
|
273
|
+
# Returns true if the value for a certain key comes from one of the sources `fetch` checks
|
|
274
|
+
# before falling back to the default value: passed in, an environment variable or the config file
|
|
275
|
+
def specified?(key)
|
|
276
|
+
UI.crash!("Key '#{key}' must be a symbol. Example :#{key}") unless key.kind_of?(Symbol)
|
|
277
|
+
|
|
278
|
+
option = verify_options_key!(key)
|
|
279
|
+
|
|
280
|
+
!@values[key].nil? ||
|
|
281
|
+
!option.fetch_env_value.nil? ||
|
|
282
|
+
self.config_file_options.key?(key)
|
|
283
|
+
end
|
|
284
|
+
|
|
270
285
|
# Overwrites or sets a new value for a given key
|
|
271
286
|
# @param key [Symbol] Must be a symbol
|
|
272
287
|
def set(key, value)
|
|
@@ -243,7 +243,7 @@ module FastlaneCore
|
|
|
243
243
|
plist_buddy_cmd = "-c \"Add :KeyboardContinuousPathEnabled bool false\""
|
|
244
244
|
plist_path = File.expand_path("~/Library/Developer/CoreSimulator/Devices/#{self.udid}/data/Library/Preferences/com.apple.keyboard.ContinuousPath.plist")
|
|
245
245
|
|
|
246
|
-
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path} >/dev/null 2>&1")
|
|
246
|
+
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path.shellescape} >/dev/null 2>&1")
|
|
247
247
|
end
|
|
248
248
|
end
|
|
249
249
|
end
|
|
@@ -300,7 +300,7 @@ module FastlaneCore
|
|
|
300
300
|
|
|
301
301
|
UI.verbose("Launching #{simulator_path} for device: #{device.name} (#{device.udid})")
|
|
302
302
|
|
|
303
|
-
Helper.backticks("open -a #{simulator_path} --args -CurrentDeviceUDID #{device.udid}", print: FastlaneCore::Globals.verbose?)
|
|
303
|
+
Helper.backticks("open -a #{simulator_path.shellescape} --args -CurrentDeviceUDID #{device.udid}", print: FastlaneCore::Globals.verbose?)
|
|
304
304
|
end
|
|
305
305
|
|
|
306
306
|
def copy_logs(device, log_identity, logs_destination_dir, log_collection_start_time)
|
|
@@ -57,6 +57,21 @@ module FastlaneCore
|
|
|
57
57
|
!self.bundler? && !self.contained_fastlane? && !self.homebrew? && !self.mac_app?
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
# How this fastlane was installed, as reported to analytics and printed at startup
|
|
61
|
+
def self.install_method
|
|
62
|
+
if self.bundler?
|
|
63
|
+
'bundler'
|
|
64
|
+
elsif self.contained_fastlane?
|
|
65
|
+
'standalone'
|
|
66
|
+
elsif self.homebrew?
|
|
67
|
+
'homebrew'
|
|
68
|
+
elsif self.mac_app?
|
|
69
|
+
'mac_app'
|
|
70
|
+
else
|
|
71
|
+
'gem'
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
60
75
|
# environment
|
|
61
76
|
#
|
|
62
77
|
|
|
@@ -332,18 +347,18 @@ module FastlaneCore
|
|
|
332
347
|
# Zips directory
|
|
333
348
|
def self.zip_directory(path, output_path, contents_only: false, overwrite: false, print: true)
|
|
334
349
|
if overwrite
|
|
335
|
-
overwrite_command = " && rm -f
|
|
350
|
+
overwrite_command = " && rm -f #{output_path.shellescape}"
|
|
336
351
|
else
|
|
337
352
|
overwrite_command = ""
|
|
338
353
|
end
|
|
339
354
|
|
|
340
355
|
if contents_only
|
|
341
|
-
command = "cd
|
|
356
|
+
command = "cd #{path.shellescape}#{overwrite_command} && zip -r #{output_path.shellescape} *"
|
|
342
357
|
else
|
|
343
358
|
containing_path = File.expand_path("..", path)
|
|
344
359
|
contents_path = File.basename(path)
|
|
345
360
|
|
|
346
|
-
command = "cd
|
|
361
|
+
command = "cd #{containing_path.shellescape}#{overwrite_command} && zip -r #{output_path.shellescape} #{contents_path.shellescape}"
|
|
347
362
|
end
|
|
348
363
|
|
|
349
364
|
UI.command(command) unless print
|
|
@@ -381,6 +396,8 @@ module FastlaneCore
|
|
|
381
396
|
# we set the default here, instead of at the parameters
|
|
382
397
|
# as we don't want to `UI.message` a rocket that's just there for the loading indicator
|
|
383
398
|
text ||= "🚀"
|
|
399
|
+
# A spinner left running by a show without a hide could never be stopped once replaced
|
|
400
|
+
@require_fastlane_spinner.stop if @require_fastlane_spinner && !@require_fastlane_spinner.done?
|
|
384
401
|
@require_fastlane_spinner = TTY::Spinner.new("[:spinner] #{text} ", format: :dots)
|
|
385
402
|
@require_fastlane_spinner.auto_spin
|
|
386
403
|
else
|
|
@@ -388,12 +405,24 @@ module FastlaneCore
|
|
|
388
405
|
end
|
|
389
406
|
end
|
|
390
407
|
|
|
391
|
-
def self.hide_loading_indicator
|
|
408
|
+
def self.hide_loading_indicator(success: true)
|
|
392
409
|
if self.should_show_loading_indicator? && @require_fastlane_spinner
|
|
393
|
-
@require_fastlane_spinner.success
|
|
410
|
+
success ? @require_fastlane_spinner.success : @require_fastlane_spinner.error
|
|
394
411
|
end
|
|
395
412
|
end
|
|
396
413
|
|
|
414
|
+
# Shows the loading indicator while the block runs, and hides it even when the block raises
|
|
415
|
+
def self.with_loading_indicator(text = nil)
|
|
416
|
+
failed = false
|
|
417
|
+
show_loading_indicator(text)
|
|
418
|
+
yield
|
|
419
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
|
420
|
+
failed = true
|
|
421
|
+
raise
|
|
422
|
+
ensure
|
|
423
|
+
hide_loading_indicator(success: !failed)
|
|
424
|
+
end
|
|
425
|
+
|
|
397
426
|
# files
|
|
398
427
|
#
|
|
399
428
|
|
|
@@ -9,14 +9,6 @@ require_relative 'helper'
|
|
|
9
9
|
require_relative 'fastlane_pty'
|
|
10
10
|
|
|
11
11
|
module FastlaneCore
|
|
12
|
-
# The TransporterInputError occurs when you passed wrong inputs to the {Deliver::ItunesTransporter}
|
|
13
|
-
class TransporterInputError < StandardError
|
|
14
|
-
end
|
|
15
|
-
# The TransporterTransferError occurs when some error happens
|
|
16
|
-
# while uploading or downloading something from/to iTC
|
|
17
|
-
class TransporterTransferError < StandardError
|
|
18
|
-
end
|
|
19
|
-
|
|
20
12
|
# Used internally
|
|
21
13
|
class TransporterRequiresApplicationSpecificPasswordError < StandardError
|
|
22
14
|
end
|
|
@@ -791,8 +783,6 @@ module FastlaneCore
|
|
|
791
783
|
# @param app_id [Integer] The unique App ID
|
|
792
784
|
# @param dir [String] the path in which the package file should be stored
|
|
793
785
|
# @return (Bool) True if everything worked fine
|
|
794
|
-
# @raise [Deliver::TransporterTransferError] when something went wrong
|
|
795
|
-
# when transferring
|
|
796
786
|
def download(app_id, dir = nil)
|
|
797
787
|
# Dir.tmpdir, not a literal "/tmp": the transporter chdirs into this
|
|
798
788
|
# directory, and "/tmp" is not one on Windows. See fastlane#30184.
|
|
@@ -832,8 +822,6 @@ module FastlaneCore
|
|
|
832
822
|
# @param package_path [String] the path to the package file (used instead of app_id and dir)
|
|
833
823
|
# @param asset_path [String] the path to the ipa/dmg/pkg file (used instead of package_path if running on macOS)
|
|
834
824
|
# @return (Bool) True if everything worked fine
|
|
835
|
-
# @raise [Deliver::TransporterTransferError] when something went wrong
|
|
836
|
-
# when transferring
|
|
837
825
|
def upload(app_id = nil, dir = nil, package_path: nil, asset_path: nil, platform: nil)
|
|
838
826
|
raise "app_id and dir are required or package_path or asset_path is required" if (app_id.nil? || dir.nil?) && package_path.nil? && asset_path.nil?
|
|
839
827
|
|
|
@@ -901,8 +889,6 @@ module FastlaneCore
|
|
|
901
889
|
# @param dir [String] the path in which the package file is located
|
|
902
890
|
# @param package_path [String] the path to the package file (used instead of app_id and dir)
|
|
903
891
|
# @return (Bool) True if everything worked fine
|
|
904
|
-
# @raise [Deliver::TransporterTransferError] when something went wrong
|
|
905
|
-
# when transferring
|
|
906
892
|
def verify(app_id = nil, dir = nil, package_path: nil, asset_path: nil, platform: nil)
|
|
907
893
|
raise "app_id and dir are required or package_path or asset_path is required" if (app_id.nil? || dir.nil?) && package_path.nil? && asset_path.nil?
|
|
908
894
|
|
|
@@ -54,37 +54,34 @@ module FastlaneCore
|
|
|
54
54
|
command << " 1> /dev/null" # always disable stdout. This can be very verbose, and leak potentially sensitive info
|
|
55
55
|
|
|
56
56
|
# Showing loading indicator as this can take some time if a lot of keys installed
|
|
57
|
-
Helper.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
57
|
+
Helper.with_loading_indicator("Setting key partition list... (this can take a minute if there are a lot of keys installed)") do
|
|
58
|
+
# Strip keychain password from command output
|
|
59
|
+
sensitive_command = command.gsub(password_part, " -k ********")
|
|
60
|
+
UI.command(sensitive_command) if output
|
|
61
|
+
Open3.popen3(command) do |stdin, stdout, stderr, thrd|
|
|
62
|
+
unless thrd.value.success?
|
|
63
|
+
err = stderr.read.to_s.strip
|
|
64
|
+
|
|
65
|
+
# Inform user when no/wrong password was used as its needed to prevent UI permission popup from Xcode when signing
|
|
66
|
+
if err.include?("SecKeychainItemSetAccessWithPassword")
|
|
67
|
+
keychain_name = File.basename(keychain_path, ".*")
|
|
68
|
+
Security::InternetPassword.delete(server: server_name(keychain_name))
|
|
69
|
+
|
|
70
|
+
UI.important("")
|
|
71
|
+
UI.important("Could not configure imported keychain item (certificate) to prevent UI permission popup when code signing\n" \
|
|
72
|
+
"Check if you supplied the correct `keychain_password` for keychain: `#{keychain_path}`\n" \
|
|
73
|
+
"#{err}")
|
|
74
|
+
UI.important("")
|
|
75
|
+
UI.important("Please look at the following docs to see how to set a keychain password:")
|
|
76
|
+
UI.important(" - https://docs.fastlane.tools/actions/sync_code_signing")
|
|
77
|
+
UI.important(" - https://docs.fastlane.tools/actions/get_certificates")
|
|
78
|
+
else
|
|
79
|
+
UI.error(err)
|
|
80
|
+
end
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
# Hiding after Open3 finishes
|
|
86
|
-
Helper.hide_loading_indicator
|
|
87
|
-
|
|
88
85
|
end
|
|
89
86
|
end
|
|
90
87
|
|
|
@@ -98,7 +95,13 @@ module FastlaneCore
|
|
|
98
95
|
server = server_name(keychain_name)
|
|
99
96
|
|
|
100
97
|
# Attempt to find password in keychain for keychain
|
|
101
|
-
|
|
98
|
+
begin
|
|
99
|
+
item = Security::InternetPassword.find(server: server)
|
|
100
|
+
rescue Security::Error => ex
|
|
101
|
+
UI.important("Could not read the keychain item #{server}: #{ex.message}")
|
|
102
|
+
item = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
102
105
|
if item
|
|
103
106
|
keychain_password = item.password
|
|
104
107
|
UI.important("Using keychain password from keychain item #{server} in #{keychain_path}")
|
|
@@ -8,7 +8,6 @@ module FastlaneCore
|
|
|
8
8
|
# The new format used from September 2015 on
|
|
9
9
|
# This was generated from `Spaceship::Tunes.client.available_languages.sort`
|
|
10
10
|
# Updates should also be made to:
|
|
11
|
-
# - produce/lib/produce/available_default_languages.rb
|
|
12
11
|
# - spaceship/lib/assets/languageMapping.json
|
|
13
12
|
# See pull request for example: https://github.com/fastlane/fastlane/pull/14110
|
|
14
13
|
ALL_LANGUAGES = %w[ar-SA bn-BD ca cs da de-DE el en-AU en-CA en-GB en-US es-ES es-MX fi fr-CA fr-FR gu-IN he hi hr hu id it ja kn-IN ko ml-IN mr-IN ms nl-NL no or-IN pa-IN pl pt-BR pt-PT ro ru sk sl-SI sv ta-IN te-IN th tr uk ur-PK vi zh-Hans zh-Hant]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require_relative 'configuration/configuration'
|
|
2
2
|
require_relative 'helper'
|
|
3
|
+
require_relative 'secrets'
|
|
3
4
|
|
|
4
5
|
module FastlaneCore
|
|
5
6
|
class PrintTable
|
|
@@ -87,6 +88,8 @@ module FastlaneCore
|
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
def transform_output(rows, transform: :newline)
|
|
91
|
+
# Masked before wrapping, which would split a secret across lines
|
|
92
|
+
rows = rows.map { |row| row.map { |column| column.kind_of?(String) ? Secrets.mask(column) : column } }
|
|
90
93
|
return rows unless should_transform?
|
|
91
94
|
|
|
92
95
|
require 'fastlane_core/string_filters'
|
|
@@ -110,7 +113,7 @@ module FastlaneCore
|
|
|
110
113
|
return return_array
|
|
111
114
|
end
|
|
112
115
|
|
|
113
|
-
def collect_rows(options: nil, hide_keys: [], mask_keys: [], prefix: '', mask:
|
|
116
|
+
def collect_rows(options: nil, hide_keys: [], mask_keys: [], prefix: '', mask: nil)
|
|
114
117
|
rows = []
|
|
115
118
|
|
|
116
119
|
options.each do |key, value|
|
|
@@ -118,7 +121,7 @@ module FastlaneCore
|
|
|
118
121
|
next if value.nil?
|
|
119
122
|
next if value.to_s == ""
|
|
120
123
|
next if hide_keys.include?(prefixed_key)
|
|
121
|
-
value = mask if mask_keys.include?(prefixed_key)
|
|
124
|
+
value = mask || Secrets.label(key) if mask_keys.include?(prefixed_key)
|
|
122
125
|
|
|
123
126
|
if value.respond_to?(:key)
|
|
124
127
|
rows.concat(self.collect_rows(options: value, hide_keys: hide_keys, mask_keys: mask_keys, prefix: "#{prefix}#{key}.", mask: mask))
|
|
@@ -106,26 +106,17 @@ module FastlaneCore
|
|
|
106
106
|
|
|
107
107
|
private
|
|
108
108
|
|
|
109
|
+
# keychain_path is ignored: unlike `security cms -D`, this imports no certificate into a keychain. See #30186.
|
|
109
110
|
def decode(path, keychain_path = nil)
|
|
110
|
-
require '
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
decoded = `security cms -D -i "#{path}" -k "#{keychain_path.shellescape}" 2> #{err}`
|
|
120
|
-
end
|
|
121
|
-
else
|
|
122
|
-
# `security` only works on Mac, fallback to `openssl`
|
|
123
|
-
# via https://stackoverflow.com/a/14379814/252627
|
|
124
|
-
decoded = `openssl smime -inform der -verify -noverify -in #{path.shellescape} 2> #{err}`
|
|
125
|
-
end
|
|
126
|
-
UI.error("Failure to decode #{path}. Exit: #{$?.exitstatus}: #{File.read(err)}") if $?.exitstatus != 0
|
|
127
|
-
decoded
|
|
128
|
-
end
|
|
111
|
+
require 'openssl'
|
|
112
|
+
profile = OpenSSL::PKCS7.new(File.binread(path))
|
|
113
|
+
# NOVERIFY skips the certificate chain, which `security cms -D` does not enforce either, but still checks the signature.
|
|
114
|
+
# A mismatch is decoded anyway, as `security cms -D` did: match/spec/fixtures/test.provisionprofile has one.
|
|
115
|
+
UI.important("The signature of #{path} does not match its content: it was changed after it was signed") unless profile.verify([], OpenSSL::X509::Store.new, nil, OpenSSL::PKCS7::NOVERIFY)
|
|
116
|
+
profile.data.to_s
|
|
117
|
+
rescue ArgumentError, OpenSSL::PKCS7::PKCS7Error, SystemCallError => e
|
|
118
|
+
UI.error("Failure to decode #{path}: #{e.message}")
|
|
119
|
+
""
|
|
129
120
|
end
|
|
130
121
|
end
|
|
131
122
|
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
require_relative 'core_ext/shellwords'
|
|
2
|
+
require_relative 'env'
|
|
3
|
+
|
|
4
|
+
module FastlaneCore
|
|
5
|
+
# Values hidden from everything fastlane prints. Only output is masked: commands still receive the real value.
|
|
6
|
+
# FASTLANE_DISABLE_SECRET_MASKING turns it off, for debugging.
|
|
7
|
+
module Secrets
|
|
8
|
+
MASK = '********'.freeze
|
|
9
|
+
# Shorter values would mask unrelated text.
|
|
10
|
+
MIN_LENGTH = 4
|
|
11
|
+
|
|
12
|
+
# Masks what is written to an IO, so `puts`, `print`, `abort` and Logger output are covered.
|
|
13
|
+
module OutputFilter
|
|
14
|
+
def write(*args)
|
|
15
|
+
super(*args.map { |arg| Secrets.mask(arg.to_s) })
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
class << self
|
|
20
|
+
# Registers a secret, or every String inside a Hash or Array, together with the escaped forms `sh` prints.
|
|
21
|
+
# A name, such as the option's key, replaces it with `<NAME>_REDACTED` rather than MASK.
|
|
22
|
+
def register(value, name: nil)
|
|
23
|
+
case value
|
|
24
|
+
when Hash then value.each_value { |v| register(v, name: name) }
|
|
25
|
+
when Array then value.each { |v| register(v, name: name) }
|
|
26
|
+
when String
|
|
27
|
+
return if value.length < MIN_LENGTH
|
|
28
|
+
|
|
29
|
+
replacement = name ? label(name) : MASK
|
|
30
|
+
[value, Shellwords.escape(value), value.shellescape].each do |form|
|
|
31
|
+
labels[form.b] = replacement if [nil, MASK].include?(labels[form.b])
|
|
32
|
+
end
|
|
33
|
+
@pattern = nil
|
|
34
|
+
install_output_filter unless disabled?
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def mask(text)
|
|
39
|
+
return text if labels.empty? || !text.kind_of?(String) || disabled?
|
|
40
|
+
|
|
41
|
+
# One pass: a name put in place of a secret is not masked again by a shorter secret it contains
|
|
42
|
+
text.b.gsub(pattern) { |match| labels[match] }.force_encoding(text.encoding)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# What a secret registered under this name is replaced with, e.g. API_TOKEN_REDACTED
|
|
46
|
+
def label(name)
|
|
47
|
+
"#{name.to_s.upcase}_REDACTED"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def labels
|
|
51
|
+
@labels ||= {}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def clear
|
|
55
|
+
@labels = {}
|
|
56
|
+
@pattern = nil
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def disabled?
|
|
60
|
+
FastlaneCore::Env.truthy?('FASTLANE_DISABLE_SECRET_MASKING')
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
private
|
|
64
|
+
|
|
65
|
+
# Longest first, so a secret wins over a shorter one it contains
|
|
66
|
+
def pattern
|
|
67
|
+
@pattern ||= Regexp.union(labels.keys.sort_by { |v| -v.length })
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def install_output_filter
|
|
71
|
+
[$stdout, $stderr].each do |io|
|
|
72
|
+
io.singleton_class.prepend(OutputFilter) unless io.singleton_class.include?(OutputFilter)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -265,11 +265,11 @@ module Commander
|
|
|
265
265
|
ui.error("- If you use system Ruby:")
|
|
266
266
|
ui.error(" - Run `brew update && brew install ruby`")
|
|
267
267
|
ui.error("- If you use rbenv with ruby-build:")
|
|
268
|
-
ui.error(" - Run `brew update && brew upgrade ruby-build && rbenv install
|
|
269
|
-
ui.error(" - Run `rbenv global
|
|
268
|
+
ui.error(" - Run `brew update && brew upgrade ruby-build && rbenv install #{Fastlane::SUGGESTED_MINIMUM_RUBY}`")
|
|
269
|
+
ui.error(" - Run `rbenv global #{Fastlane::SUGGESTED_MINIMUM_RUBY}` to make it the new global default Ruby version")
|
|
270
270
|
ui.error("- If you use rvm:")
|
|
271
271
|
ui.error(" - First run `rvm osx-ssl-certs update all`")
|
|
272
|
-
ui.error(" - Then run `rvm reinstall ruby
|
|
272
|
+
ui.error(" - Then run `rvm reinstall ruby-#{Fastlane::SUGGESTED_MINIMUM_RUBY}`")
|
|
273
273
|
ui.error("")
|
|
274
274
|
ui.error("If that doesn't fix your issue, please google for the following error message:")
|
|
275
275
|
ui.error(" '#{e}'")
|
|
@@ -20,7 +20,7 @@ module Fastlane
|
|
|
20
20
|
report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }
|
|
21
21
|
|
|
22
22
|
if report.issues.count > NUMBER_OF_ISSUES_INLINE
|
|
23
|
-
report.url.
|
|
23
|
+
report.url.gsub!('\'', '%27')
|
|
24
24
|
puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}")
|
|
25
25
|
puts("")
|
|
26
26
|
end
|