fastlane 2.238.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/html_generator.rb +1 -1
- data/deliver/lib/deliver/options.rb +8 -0
- data/deliver/lib/deliver/runner.rb +5 -4
- 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 +34 -16
- data/deliver/lib/deliver/upload_screenshots.rb +24 -18
- 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 +3 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +7 -2
- 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 +7 -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 +11 -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/spaceship_logs.rb +4 -2
- data/fastlane/lib/fastlane/actions/splunkmint.rb +8 -1
- data/fastlane/lib/fastlane/actions/swiftlint.rb +6 -3
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +4 -2
- 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/git_helper.rb +4 -2
- data/fastlane/lib/fastlane/helper/sh_helper.rb +25 -7
- 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 +7 -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 +8 -1
- data/fastlane/swift/Fastlane.swift +129 -11
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +8 -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 +15 -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 +8 -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/fastlane_pty.rb +20 -7
- data/fastlane_core/lib/fastlane_core/helper.rb +34 -5
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +16 -27
- 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/project.rb +19 -0
- 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/options.rb +5 -0
- 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/nuke.rb +2 -2
- data/match/lib/match/options.rb +13 -5
- data/match/lib/match/runner.rb +30 -3
- data/match/lib/match/storage/git_storage.rb +44 -11
- data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
- data/match/lib/match/storage/google_cloud_storage.rb +6 -1
- data/match/lib/match/storage/interface.rb +8 -5
- data/pem/lib/pem/manager.rb +5 -1
- data/pem/lib/pem/module.rb +0 -4
- data/pem/lib/pem/options.rb +6 -0
- data/pilot/lib/pilot/build_manager.rb +32 -0
- data/pilot/lib/pilot/options.rb +8 -0
- 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 +12 -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 +38 -9
- 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/options.rb +5 -0
- 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 +159 -19
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +16 -0
- 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/models/routing_app_coverage.rb +75 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +25 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +45 -0
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +4 -3
- 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/client.rb +6 -0
- data/supply/lib/supply/options.rb +1 -0
- data/supply/lib/supply/reader.rb +15 -0
- data/supply/lib/supply.rb +0 -1
- data/trainer/lib/trainer/xcresult/helper.rb +27 -13
- metadata +80 -64
- 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
|
@@ -88,7 +88,6 @@ module Produce
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# rubocop:disable Metrics/PerceivedComplexity
|
|
91
|
-
# rubocop:disable Require/MissingRequireStatement
|
|
92
91
|
def update(on, options)
|
|
93
92
|
updated = valid_services_for(options).count
|
|
94
93
|
|
|
@@ -420,10 +419,9 @@ module Produce
|
|
|
420
419
|
|
|
421
420
|
def bundle_id
|
|
422
421
|
return @bundle_id if @bundle_id
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
UI.message("Successfully logged in")
|
|
422
|
+
|
|
423
|
+
Produce.authenticate_connect_api!
|
|
424
|
+
|
|
427
425
|
@bundle_id ||= Spaceship::ConnectAPI::BundleId.find(Produce.config[:app_identifier].to_s)
|
|
428
426
|
end
|
|
429
427
|
end
|
data/produce/lib/produce.rb
CHANGED
data/scan/lib/scan/options.rb
CHANGED
|
@@ -207,6 +207,13 @@ module Scan
|
|
|
207
207
|
conflict_block: proc do |value|
|
|
208
208
|
UI.user_error!("You can't use 'thread_sanitizer' and 'address_sanitizer' options in one run")
|
|
209
209
|
end),
|
|
210
|
+
FastlaneCore::ConfigItem.new(key: :collect_test_diagnostics,
|
|
211
|
+
env_name: "SCAN_COLLECT_TEST_DIAGNOSTICS",
|
|
212
|
+
description: "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)",
|
|
213
|
+
optional: true,
|
|
214
|
+
verify_block: proc do |value|
|
|
215
|
+
UI.user_error!("Invalid collect_test_diagnostics #{value}") unless ['on-failure', 'never'].include?(value)
|
|
216
|
+
end),
|
|
210
217
|
|
|
211
218
|
# output
|
|
212
219
|
FastlaneCore::ConfigItem.new(key: :open_report,
|
|
@@ -527,6 +534,11 @@ module Scan
|
|
|
527
534
|
description: "Skips resolution of Swift Package Manager dependencies",
|
|
528
535
|
type: Boolean,
|
|
529
536
|
default_value: false),
|
|
537
|
+
FastlaneCore::ConfigItem.new(key: :disallow_xcodebuild_settings_lookup,
|
|
538
|
+
env_name: "SCAN_DISALLOW_XCODEBUILD_SETTINGS_LOOKUP",
|
|
539
|
+
description: "Raises an error instead of fetching build settings by running `xcodebuild -showBuildSettings`, which can take a long time on large projects. The error names the required build setting, so the corresponding option can be specified manually",
|
|
540
|
+
type: Boolean,
|
|
541
|
+
default_value: false),
|
|
530
542
|
FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
|
|
531
543
|
env_name: "SCAN_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
|
|
532
544
|
description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file. This translates in the option `-disableAutomaticPackageResolution` being passed to xcodebuild",
|
data/scan/lib/scan/runner.rb
CHANGED
|
@@ -44,9 +44,9 @@ module Scan
|
|
|
44
44
|
|
|
45
45
|
options = []
|
|
46
46
|
options += project_path_array unless config[:xctestrun]
|
|
47
|
-
options << "-sdk
|
|
47
|
+
options << "-sdk #{config[:sdk].shellescape}" if config[:sdk]
|
|
48
48
|
options << destination if destination # generated in `detect_values`
|
|
49
|
-
options << "-toolchain
|
|
49
|
+
options << "-toolchain #{config[:toolchain].to_s.shellescape}" if config[:toolchain]
|
|
50
50
|
if config[:derived_data_path] && !options.include?("-derivedDataPath #{config[:derived_data_path].shellescape}")
|
|
51
51
|
options << "-derivedDataPath #{config[:derived_data_path].shellescape}"
|
|
52
52
|
end
|
|
@@ -68,6 +68,9 @@ module Scan
|
|
|
68
68
|
options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil?
|
|
69
69
|
options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil?
|
|
70
70
|
options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil?
|
|
71
|
+
if config[:collect_test_diagnostics] && FastlaneCore::Helper.xcode_at_least?(14)
|
|
72
|
+
options << "-collect-test-diagnostics #{config[:collect_test_diagnostics]}"
|
|
73
|
+
end
|
|
71
74
|
if FastlaneCore::Helper.xcode_at_least?(11)
|
|
72
75
|
if config[:cloned_source_packages_path] && !options.include?("-clonedSourcePackagesDirPath #{config[:cloned_source_packages_path].shellescape}")
|
|
73
76
|
options << "-clonedSourcePackagesDirPath #{config[:cloned_source_packages_path].shellescape}"
|
|
@@ -77,14 +80,14 @@ module Scan
|
|
|
77
80
|
options << "-packageCachePath #{config[:package_cache_path].shellescape}"
|
|
78
81
|
end
|
|
79
82
|
|
|
80
|
-
options << "-testPlan
|
|
83
|
+
options << "-testPlan #{config[:testplan].shellescape}" if config[:testplan]
|
|
81
84
|
|
|
82
85
|
# detect_values will ensure that these values are present as Arrays if
|
|
83
86
|
# they are present at all
|
|
84
|
-
options += config[:only_test_configurations].map { |name| "-only-test-configuration
|
|
85
|
-
options += config[:skip_test_configurations].map { |name| "-skip-test-configuration
|
|
87
|
+
options += config[:only_test_configurations].map { |name| "-only-test-configuration #{name.shellescape}" } if config[:only_test_configurations]
|
|
88
|
+
options += config[:skip_test_configurations].map { |name| "-skip-test-configuration #{name.shellescape}" } if config[:skip_test_configurations]
|
|
86
89
|
end
|
|
87
|
-
options << "-xctestrun
|
|
90
|
+
options << "-xctestrun #{config[:xctestrun].shellescape}" if config[:xctestrun]
|
|
88
91
|
options << config[:xcargs] if config[:xcargs]
|
|
89
92
|
|
|
90
93
|
# Number of retries does not equal xcodebuild's -test-iterations number
|
|
@@ -127,7 +130,7 @@ module Scan
|
|
|
127
130
|
end
|
|
128
131
|
|
|
129
132
|
def pipe
|
|
130
|
-
pipe = ["| tee
|
|
133
|
+
pipe = ["| tee #{xcodebuild_log_path.shellescape}"]
|
|
131
134
|
|
|
132
135
|
# disable_xcpretty is now deprecated and directs to use output_style of raw
|
|
133
136
|
if Scan.config[:disable_xcpretty] || Scan.config[:output_style] == 'raw'
|
|
@@ -182,7 +185,7 @@ module Scan
|
|
|
182
185
|
formatter = []
|
|
183
186
|
if (custom_formatter = Scan.config[:xcpretty_formatter] || Scan.config[:formatter])
|
|
184
187
|
if custom_formatter.end_with?(".rb")
|
|
185
|
-
formatter << "-f
|
|
188
|
+
formatter << "-f #{custom_formatter.shellescape}"
|
|
186
189
|
else
|
|
187
190
|
formatter << "-f `#{custom_formatter}`"
|
|
188
191
|
end
|
|
@@ -234,7 +237,7 @@ module Scan
|
|
|
234
237
|
# Generate destination parameters
|
|
235
238
|
def destination
|
|
236
239
|
unless Scan.cache[:destination]
|
|
237
|
-
Scan.cache[:destination] = [*Scan.config[:destination]].map { |dst| "-destination
|
|
240
|
+
Scan.cache[:destination] = [*Scan.config[:destination]].map { |dst| "-destination #{dst.shellescape}" }.join(' ')
|
|
238
241
|
end
|
|
239
242
|
Scan.cache[:destination]
|
|
240
243
|
end
|
|
@@ -3,6 +3,7 @@ require_relative 'module'
|
|
|
3
3
|
module Scan
|
|
4
4
|
class TestResultParser
|
|
5
5
|
def parse_result(output)
|
|
6
|
+
UI.deprecated("Scan::TestResultParser is deprecated and will be removed in a future version of fastlane; scan no longer uses it. Read the test counts from the result bundle with Trainer::TestParser, or from the <testsuites> attributes of the JUnit report.")
|
|
6
7
|
unless output
|
|
7
8
|
return {
|
|
8
9
|
tests: 0,
|
|
@@ -49,7 +49,7 @@ module Scan
|
|
|
49
49
|
type = raw_type.strip
|
|
50
50
|
output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type))
|
|
51
51
|
reporter << "--report #{type}"
|
|
52
|
-
reporter << "--output
|
|
52
|
+
reporter << "--output #{output_path.shellescape}"
|
|
53
53
|
|
|
54
54
|
if type == "html" && @open_report
|
|
55
55
|
Scan.cache[:open_html_report_path] = output_path
|
|
@@ -62,7 +62,7 @@ module Scan
|
|
|
62
62
|
@temp_junit_report = Tempfile.new("junit_report")
|
|
63
63
|
Scan.cache[:temp_junit_report] = @temp_junit_report.path
|
|
64
64
|
reporter << "--report junit"
|
|
65
|
-
reporter << "--output
|
|
65
|
+
reporter << "--output #{Scan.cache[:temp_junit_report].shellescape}"
|
|
66
66
|
return reporter
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -65,18 +65,18 @@
|
|
|
65
65
|
</style>
|
|
66
66
|
</head>
|
|
67
67
|
<body><% image_counter = 0 %><% @data.each do |language, content| %>
|
|
68
|
-
<h1 id="<%= language %>" class="language"><%= language %></h1>
|
|
68
|
+
<h1 id="<%= ERB::Util.h(language) %>" class="language"><%= ERB::Util.h(language) %></h1>
|
|
69
69
|
<hr>
|
|
70
70
|
<table><% content.each do |device_name, screens| %>
|
|
71
71
|
<tr>
|
|
72
72
|
<th colspan="<%= screens.count %>">
|
|
73
|
-
<a id="<%= language %>-<%= device_name %>" class="deviceName" href="#<%= language %>-<%= device_name %>"><%= device_name %></a>
|
|
73
|
+
<a id="<%= ERB::Util.h(language) %>-<%= ERB::Util.h(device_name) %>" class="deviceName" href="#<%= ERB::Util.h(language) %>-<%= ERB::Util.h(device_name) %>"><%= ERB::Util.h(device_name) %></a>
|
|
74
74
|
</th>
|
|
75
75
|
</tr>
|
|
76
76
|
<tr><% screens.each do |screen_path| %><% next if screen_path.include?"_framed.png" %>
|
|
77
77
|
<td><% image_counter += 1 %>
|
|
78
|
-
<a href="<%= screen_path %>" target="_blank" class="screenshotLink">
|
|
79
|
-
<img class="screenshot" src="<%= screen_path %>" style="width: 100%;" alt="<%= language %> <%= device_name %>" data-counter="<%= image_counter %>">
|
|
78
|
+
<a href="<%= ERB::Util.h(screen_path) %>" target="_blank" class="screenshotLink">
|
|
79
|
+
<img class="screenshot" src="<%= ERB::Util.h(screen_path) %>" style="width: 100%;" alt="<%= ERB::Util.h(language) %> <%= ERB::Util.h(device_name) %>" data-counter="<%= image_counter %>">
|
|
80
80
|
</a>
|
|
81
81
|
</td><% end %>
|
|
82
82
|
</tr><% end %>
|
|
@@ -128,9 +128,14 @@
|
|
|
128
128
|
imageDisplay.alt = img.alt;
|
|
129
129
|
imageDisplay.dataset.counter = img.dataset.counter;
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
// textContent, not innerHTML: file names must not be interpreted as HTML
|
|
132
|
+
var imageTitle = document.createElement('h3');
|
|
133
|
+
imageTitle.textContent = img.alt;
|
|
134
|
+
imageInfo.textContent = '';
|
|
135
|
+
imageInfo.appendChild(imageTitle);
|
|
136
|
+
imageInfo.appendChild(document.createTextNode(decodeURI(img.src.split("/").pop())));
|
|
137
|
+
imageInfo.appendChild(document.createElement('br'));
|
|
138
|
+
imageInfo.appendChild(document.createTextNode(tmpImg.height+'\u00d7'+tmpImg.width+'px'));
|
|
134
139
|
|
|
135
140
|
overlay.style.display = "block";
|
|
136
141
|
});
|
|
@@ -30,7 +30,7 @@ module Screengrab
|
|
|
30
30
|
|
|
31
31
|
export_path = File.expand_path(export_path)
|
|
32
32
|
UI.success("Successfully created HTML file with an overview of all the screenshots: '#{export_path}'")
|
|
33
|
-
system("open
|
|
33
|
+
system("open", export_path) unless Screengrab.config[:skip_open_summary]
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
data/sigh/lib/assets/resign.sh
CHANGED
|
@@ -321,6 +321,23 @@ else
|
|
|
321
321
|
error "Error: Only can resign .app files and .ipa files."
|
|
322
322
|
fi
|
|
323
323
|
|
|
324
|
+
# Stop if a symbolic link resolves outside the temporary directory: later steps write through such links.
|
|
325
|
+
# Resolved with the cd -P and pwd -P builtins, as realpath and readlink -f are missing on older macOS.
|
|
326
|
+
TEMP_DIR_PHYSICAL="$(cd -P "$TEMP_DIR" && pwd -P)"
|
|
327
|
+
checkStatus
|
|
328
|
+
while IFS= read -d '' -r link; do
|
|
329
|
+
target="$(readlink "$link")"
|
|
330
|
+
[[ "$target" == /* ]] || target="$(dirname "$link")/$target"
|
|
331
|
+
if [ -d "$target" ]; then
|
|
332
|
+
resolved="$(cd -P "$target" 2>/dev/null && pwd -P)"
|
|
333
|
+
else
|
|
334
|
+
resolved="$(cd -P "$(dirname "$target")" 2>/dev/null && pwd -P)/$(basename "$target")"
|
|
335
|
+
fi
|
|
336
|
+
if [[ "$resolved" != "$TEMP_DIR_PHYSICAL" && "$resolved" != "$TEMP_DIR_PHYSICAL"/* ]]; then
|
|
337
|
+
error "Error: '${link#"$TEMP_DIR"/}' is a symbolic link to '$(readlink "$link")', outside of '$ORIGINAL_FILE'. Remove it before resigning."
|
|
338
|
+
fi
|
|
339
|
+
done < <(find "$TEMP_DIR" -type l -print0)
|
|
340
|
+
|
|
324
341
|
# check the keychain
|
|
325
342
|
if [ "${KEYCHAIN}" != "" ]; then
|
|
326
343
|
security list-keychains -s "$KEYCHAIN"
|
|
@@ -665,9 +682,18 @@ function resign {
|
|
|
665
682
|
# Get the old and the new team ID
|
|
666
683
|
# Old team ID is not part of app entitlements, have to get it from old embedded provisioning profile
|
|
667
684
|
security cms -D -i "$TEMP_DIR/old-embedded.mobileprovision" > "$TEMP_DIR/old-embedded-profile.plist"
|
|
668
|
-
OLD_TEAM_ID=$(PlistBuddy -c "Print :TeamIdentifier:0" "$TEMP_DIR/old-embedded-profile.plist")
|
|
685
|
+
OLD_TEAM_ID=$(PlistBuddy -c "Print :TeamIdentifier:0" "$TEMP_DIR/old-embedded-profile.plist" 2>/dev/null)
|
|
686
|
+
if [ "$OLD_TEAM_ID" == "" ]; then
|
|
687
|
+
OLD_TEAM_ID="$OLD_APP_ID"
|
|
688
|
+
fi
|
|
669
689
|
# New team ID is part of profile entitlements
|
|
670
|
-
NEW_TEAM_ID=$(PlistBuddy -c "Print com.apple.developer.team-identifier" "$PROFILE_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
|
|
690
|
+
NEW_TEAM_ID=$(PlistBuddy -c "Print :com.apple.developer.team-identifier" "$PROFILE_ENTITLEMENTS" 2>/dev/null | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
|
|
691
|
+
if [ "$NEW_TEAM_ID" == "" ]; then
|
|
692
|
+
NEW_TEAM_ID="$TEAM_IDENTIFIER"
|
|
693
|
+
fi
|
|
694
|
+
if [ "$NEW_TEAM_ID" == "" ]; then
|
|
695
|
+
NEW_TEAM_ID="$NEW_APP_ID"
|
|
696
|
+
fi
|
|
671
697
|
|
|
672
698
|
log "Patching profile entitlements with values from app entitlements"
|
|
673
699
|
PATCHED_ENTITLEMENTS="$TEMP_DIR/patchedEntitlements"
|
|
@@ -866,13 +892,16 @@ function resign {
|
|
|
866
892
|
OLD_BUNDLE_ID="$(PlistBuddy -c "Print :CFBundleIdentifier" "$TEMP_DIR/oldInfo.plist")"
|
|
867
893
|
NEW_BUNDLE_ID="$(bundle_id_for_provision "$NEW_PROVISION")"
|
|
868
894
|
log "Replacing old bundle ID '$OLD_BUNDLE_ID' with new bundle ID '$NEW_BUNDLE_ID' in patched entitlements"
|
|
869
|
-
#
|
|
870
|
-
#
|
|
871
|
-
#
|
|
872
|
-
#
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
895
|
+
# Anchor the replacement to OLD_TEAM_ID prefix, app group prefix, or the opening <string> tag
|
|
896
|
+
# so that if NEW_BUNDLE_ID contains OLD_BUNDLE_ID as a suffix (e.g. enterprise.com.example.foo),
|
|
897
|
+
# the already-correct values (like <TEAM_ID>.enterprise.com.example.foo) do not have their
|
|
898
|
+
# suffix duplicated.
|
|
899
|
+
ESCAPED_OLD_BUNDLE_ID="${OLD_BUNDLE_ID//./\\.}"
|
|
900
|
+
if [ -n "$OLD_TEAM_ID" ] && [ -n "$NEW_TEAM_ID" ]; then
|
|
901
|
+
/usr/bin/sed -i .bak "s!<string>${OLD_TEAM_ID}\.${ESCAPED_OLD_BUNDLE_ID}</string>!<string>${NEW_TEAM_ID}.${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
|
902
|
+
fi
|
|
903
|
+
/usr/bin/sed -i .bak "s!<string>group\.${ESCAPED_OLD_BUNDLE_ID}</string>!<string>group.${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
|
904
|
+
/usr/bin/sed -i .bak "s!<string>${ESCAPED_OLD_BUNDLE_ID}</string>!<string>${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
|
876
905
|
|
|
877
906
|
log "Resigning application using certificate: '$CERTIFICATE'"
|
|
878
907
|
log "and patched entitlements:"
|
|
@@ -134,7 +134,7 @@ module Sigh
|
|
|
134
134
|
|
|
135
135
|
profiles = []
|
|
136
136
|
profile_paths.each do |profile_path|
|
|
137
|
-
profile =
|
|
137
|
+
profile = FastlaneCore::ProvisioningProfile.parse(profile_path)
|
|
138
138
|
profile['Path'] = profile_path
|
|
139
139
|
profiles << profile
|
|
140
140
|
end
|
data/sigh/lib/sigh/options.rb
CHANGED
|
@@ -63,6 +63,11 @@ module Sigh
|
|
|
63
63
|
code_gen_sensitive: true,
|
|
64
64
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier),
|
|
65
65
|
default_value_dynamic: true),
|
|
66
|
+
FastlaneCore::ConfigItem.new(key: :offline_profile,
|
|
67
|
+
env_name: "SIGH_OFFLINE_PROFILE",
|
|
68
|
+
description: "Enable profile with 'Offline Support' (7 day validity). Requires Apple ID login, not supported with App Store Connect API key authentication",
|
|
69
|
+
is_string: false,
|
|
70
|
+
default_value: false),
|
|
66
71
|
|
|
67
72
|
# App Store Connect API
|
|
68
73
|
FastlaneCore::ConfigItem.new(key: :api_key_path,
|
data/sigh/lib/sigh/resign.rb
CHANGED
|
@@ -45,10 +45,10 @@ module Sigh
|
|
|
45
45
|
entitlements = "-e #{entitlements.shellescape}" if entitlements
|
|
46
46
|
|
|
47
47
|
provisioning_options = create_provisioning_options(provisioning_profiles)
|
|
48
|
-
version = "-n #{version}" if version
|
|
48
|
+
version = "-n #{version.shellescape}" if version
|
|
49
49
|
display_name = "-d #{display_name.shellescape}" if display_name
|
|
50
|
-
short_version = "--short-version #{short_version}" if short_version
|
|
51
|
-
bundle_version = "--bundle-version #{bundle_version}" if bundle_version
|
|
50
|
+
short_version = "--short-version #{short_version.shellescape}" if short_version
|
|
51
|
+
bundle_version = "--bundle-version #{bundle_version.shellescape}" if bundle_version
|
|
52
52
|
verbose = "-v" if FastlaneCore::Globals.verbose?
|
|
53
53
|
bundle_id = "-b '#{new_bundle_id}'" if new_bundle_id
|
|
54
54
|
use_app_entitlements_flag = "--use-app-entitlements" if use_app_entitlements
|
data/sigh/lib/sigh/runner.rb
CHANGED
|
@@ -34,6 +34,10 @@ module Sigh
|
|
|
34
34
|
UI.message("Successfully logged in")
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
if Sigh.config[:offline_profile] && !Spaceship::ConnectAPI.token.nil?
|
|
38
|
+
UI.user_error!("The 'offline_profile' option requires logging in with an Apple ID. Apple's App Store Connect API (API key authentication) does not support the 'Offline Support' profile setting")
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
profiles = [] if Sigh.config[:skip_fetch_profiles]
|
|
38
42
|
profiles ||= fetch_profiles # download the profile if it's there
|
|
39
43
|
|
|
@@ -185,7 +189,8 @@ module Sigh
|
|
|
185
189
|
profile_type: profile_type,
|
|
186
190
|
bundle_id_id: bundle_id.id,
|
|
187
191
|
certificate_ids: certificates_to_use.map(&:id),
|
|
188
|
-
device_ids: devices_to_use.map(&:id)
|
|
192
|
+
device_ids: devices_to_use.map(&:id),
|
|
193
|
+
is_offline_profile: Sigh.config[:offline_profile]
|
|
189
194
|
)
|
|
190
195
|
|
|
191
196
|
profile
|
|
@@ -268,6 +268,11 @@ module Snapshot
|
|
|
268
268
|
description: "Skips resolution of Swift Package Manager dependencies",
|
|
269
269
|
type: Boolean,
|
|
270
270
|
default_value: false),
|
|
271
|
+
FastlaneCore::ConfigItem.new(key: :disallow_xcodebuild_settings_lookup,
|
|
272
|
+
env_name: "SNAPSHOT_DISALLOW_XCODEBUILD_SETTINGS_LOOKUP",
|
|
273
|
+
description: "Raises an error instead of fetching build settings by running `xcodebuild -showBuildSettings`, which can take a long time on large projects. The error names the required build setting, so the corresponding option can be specified manually",
|
|
274
|
+
type: Boolean,
|
|
275
|
+
default_value: false),
|
|
271
276
|
FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
|
|
272
277
|
env_name: "SNAPSHOT_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
|
|
273
278
|
description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file. This translates in the option `-disableAutomaticPackageResolution` being passed to xcodebuild",
|
|
@@ -96,38 +96,38 @@
|
|
|
96
96
|
<button class="tabLink" onclick="openTab(event, 'byScreen')">By Screen</button>
|
|
97
97
|
</div>
|
|
98
98
|
<div id="byLanguage" class="tabContent"><h1 class="tabTitle">By Language:</h1><% image_counter = 0 %><% @data_by_language.each do |language, content| %>
|
|
99
|
-
<h2 id="<%= language %>"><%= language %></h2>
|
|
99
|
+
<h2 id="<%= ERB::Util.h(language) %>"><%= ERB::Util.h(language) %></h2>
|
|
100
100
|
<hr>
|
|
101
101
|
<table><% content.each do |device_name, screens| %>
|
|
102
102
|
<tr>
|
|
103
103
|
<th colspan="<%= screens.count %>">
|
|
104
|
-
<a id="<%= language %>-<%= device_name %>" class="deviceName" href="#<%= language %>-<%= device_name %>"><%= device_name %></a>
|
|
104
|
+
<a id="<%= ERB::Util.h(language) %>-<%= ERB::Util.h(device_name) %>" class="deviceName" href="#<%= ERB::Util.h(language) %>-<%= ERB::Util.h(device_name) %>"><%= ERB::Util.h(device_name) %></a>
|
|
105
105
|
</th>
|
|
106
106
|
</tr>
|
|
107
107
|
<tr><% screens.each do |screen_path| %><% next if screen_path.include?"_framed.png" %>
|
|
108
108
|
<td><% image_counter += 1 %>
|
|
109
|
-
<a href="<%= screen_path %>" target="_blank" class="screenshotLink">
|
|
110
|
-
<img class="screenshot" src="<%= screen_path %>" style="width: 100%;" alt="<%= language %> <%= device_name %>" data-tab="1" data-counter="<%= image_counter %>">
|
|
109
|
+
<a href="<%= ERB::Util.h(screen_path) %>" target="_blank" class="screenshotLink">
|
|
110
|
+
<img class="screenshot" src="<%= ERB::Util.h(screen_path) %>" style="width: 100%;" alt="<%= ERB::Util.h(language) %> <%= ERB::Util.h(device_name) %>" data-tab="1" data-counter="<%= image_counter %>">
|
|
111
111
|
</a>
|
|
112
112
|
</td><% end %>
|
|
113
113
|
</tr><% end %>
|
|
114
114
|
</table><% end %>
|
|
115
115
|
</div>
|
|
116
116
|
<div id="byScreen" class="tabContent"><h1 class="tabTitle">By Screen:</h1><% image_counter = 0 %><% @data_by_screen.each do |screen, content| %>
|
|
117
|
-
<h2 id="<%= screen %>" class="screen"><%= screen %></h2>
|
|
117
|
+
<h2 id="<%= ERB::Util.h(screen) %>" class="screen"><%= ERB::Util.h(screen) %></h2>
|
|
118
118
|
<hr>
|
|
119
119
|
<table><% content.each do |device_name, screens| %>
|
|
120
120
|
<tr>
|
|
121
121
|
<th colspan="<%= screens.count %>">
|
|
122
|
-
<a id="<%= screen %>-<%= device_name %>" class="deviceName" href="#<%= screen %>-<%= device_name %>"><%= device_name %></a>
|
|
122
|
+
<a id="<%= ERB::Util.h(screen) %>-<%= ERB::Util.h(device_name) %>" class="deviceName" href="#<%= ERB::Util.h(screen) %>-<%= ERB::Util.h(device_name) %>"><%= ERB::Util.h(device_name) %></a>
|
|
123
123
|
</th>
|
|
124
124
|
</tr>
|
|
125
125
|
<tr><% screens.each do |language, screen_path| %><% next if screen_path.include?"_framed.png" %>
|
|
126
126
|
<td><% image_counter += 1 %>
|
|
127
|
-
<a href="<%= screen_path %>" target="_blank" class="screenshotLink">
|
|
128
|
-
<img class="screenshot" src="<%= screen_path %>" style="width: 100%;" alt="<%= language %> <%= device_name %>" data-tab="2" data-counter="<%= image_counter %>">
|
|
127
|
+
<a href="<%= ERB::Util.h(screen_path) %>" target="_blank" class="screenshotLink">
|
|
128
|
+
<img class="screenshot" src="<%= ERB::Util.h(screen_path) %>" style="width: 100%;" alt="<%= ERB::Util.h(language) %> <%= ERB::Util.h(device_name) %>" data-tab="2" data-counter="<%= image_counter %>">
|
|
129
129
|
</a>
|
|
130
|
-
<div class="caption"><%= language %></div>
|
|
130
|
+
<div class="caption"><%= ERB::Util.h(language) %></div>
|
|
131
131
|
</td><% end %>
|
|
132
132
|
</tr><% end %>
|
|
133
133
|
</table><% end %>
|
|
@@ -222,9 +222,14 @@
|
|
|
222
222
|
imageDisplay.alt = img.alt;
|
|
223
223
|
imageDisplay.dataset.counter = img.dataset.counter;
|
|
224
224
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
// textContent, not innerHTML: file names must not be interpreted as HTML
|
|
226
|
+
var imageTitle = document.createElement('h3');
|
|
227
|
+
imageTitle.textContent = img.alt;
|
|
228
|
+
imageInfo.textContent = '';
|
|
229
|
+
imageInfo.appendChild(imageTitle);
|
|
230
|
+
imageInfo.appendChild(document.createTextNode(decodeURI(img.src.split("/").pop())));
|
|
231
|
+
imageInfo.appendChild(document.createElement('br'));
|
|
232
|
+
imageInfo.appendChild(document.createTextNode(tmpImg.height+'\u00d7'+tmpImg.width+'px'));
|
|
228
233
|
|
|
229
234
|
overlay.style.display = "block";
|
|
230
235
|
});
|
|
@@ -51,7 +51,7 @@ module Snapshot
|
|
|
51
51
|
|
|
52
52
|
export_path = File.expand_path(export_path)
|
|
53
53
|
UI.success("Successfully created HTML file with an overview of all the screenshots: '#{export_path}'")
|
|
54
|
-
system("open
|
|
54
|
+
system("open", export_path) unless Snapshot.config[:skip_open_summary]
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def xcode_8_and_below_device_name_mappings
|
|
@@ -82,7 +82,7 @@ module Snapshot
|
|
|
82
82
|
unless launcher_config.headless
|
|
83
83
|
simulator_path = File.join(Helper.xcode_path, 'Applications', 'Simulator.app')
|
|
84
84
|
device_udid = TestCommandGenerator.device_udid(device_types.first)
|
|
85
|
-
command = "open -a #{simulator_path} -g"
|
|
85
|
+
command = "open -a #{simulator_path.shellescape} -g"
|
|
86
86
|
command += " --args -CurrentDeviceUDID #{device_udid}" if device_udid
|
|
87
87
|
Helper.backticks(command, print: FastlaneCore::Globals.verbose?)
|
|
88
88
|
end
|
data/snapshot/lib/snapshot.rb
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
require_relative 'snapshot/runner'
|
|
2
2
|
require_relative 'snapshot/reports_generator'
|
|
3
3
|
require_relative 'snapshot/detect_values'
|
|
4
|
-
require_relative 'snapshot/screenshot_flatten'
|
|
5
|
-
require_relative 'snapshot/screenshot_rotate'
|
|
6
4
|
require_relative 'snapshot/dependency_checker'
|
|
7
5
|
require_relative 'snapshot/latest_os_version'
|
|
8
6
|
require_relative 'snapshot/test_command_generator'
|
data/spaceship/README.md
CHANGED
|
@@ -27,8 +27,7 @@ Get in contact with the creators on Twitter: [@FastlaneTools](https://twitter.co
|
|
|
27
27
|
<a href="#whats-spaceship">Why?</a> •
|
|
28
28
|
<a href="#usage">Usage</a> •
|
|
29
29
|
<a href="#installation">Installation</a> •
|
|
30
|
-
<a href="#technical-details">Technical Details</a>
|
|
31
|
-
<a href="#need-help">Need help?</a>
|
|
30
|
+
<a href="#technical-details">Technical Details</a>
|
|
32
31
|
</p>
|
|
33
32
|
|
|
34
33
|
-------
|
|
@@ -165,7 +164,7 @@ _spaceship_ does a lot of magic to get everything working so neatly:
|
|
|
165
164
|
- **Multiple Spaceship**: You can launch multiple _spaceships_ with different Apple accounts to do things like syncing the registered devices.
|
|
166
165
|
|
|
167
166
|
# Code of Conduct
|
|
168
|
-
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).
|
|
167
|
+
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).
|
|
169
168
|
|
|
170
169
|
# License
|
|
171
170
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
|
@@ -224,7 +224,9 @@ module Spaceship
|
|
|
224
224
|
# The initialize method accepts a parsed response from Apple and sets all
|
|
225
225
|
# attributes that are defined by `attr_mapping`
|
|
226
226
|
#
|
|
227
|
-
# Do not override `initialize` in your own models.
|
|
227
|
+
# Do not override `initialize` in your own models, use `setup` instead. An
|
|
228
|
+
# override that has to take a value Apple's response does not carry must call
|
|
229
|
+
# `super`, or `attr_mapping`, `raw_data`, `client` and `setup` are all skipped.
|
|
228
230
|
def initialize(attrs = {}, existing_client = nil)
|
|
229
231
|
attrs.each do |key, val|
|
|
230
232
|
self.send("#{key}=", val) if respond_to?("#{key}=")
|