fastlane 2.195.0 → 2.213.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +96 -89
- data/cert/lib/cert/runner.rb +19 -8
- data/deliver/lib/assets/ScreenshotsHelp +29 -6
- data/deliver/lib/deliver/app_screenshot.rb +30 -4
- data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
- data/deliver/lib/deliver/options.rb +6 -2
- data/deliver/lib/deliver/runner.rb +88 -24
- data/deliver/lib/deliver/submit_for_review.rb +25 -3
- data/deliver/lib/deliver/upload_price_tier.rb +3 -1
- data/deliver/lib/deliver/upload_screenshots.rb +2 -2
- data/fastlane/lib/assets/AppfileTemplate +1 -1
- data/fastlane/lib/assets/AppfileTemplate.swift +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -6
- data/fastlane/lib/fastlane/actions/badge.rb +1 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/danger.rb +14 -0
- data/fastlane/lib/fastlane/actions/docs/build_app.md +5 -5
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +19 -2
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +62 -46
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +44 -5
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +8 -3
- data/fastlane/lib/fastlane/actions/git_commit.rb +4 -6
- data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -3
- data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
- data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
- data/fastlane/lib/fastlane/actions/run_tests.rb +19 -9
- data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
- data/fastlane/lib/fastlane/actions/setup_ci.rb +13 -4
- data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +31 -4
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +10 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcode_install.rb +5 -1
- data/fastlane/lib/fastlane/actions/xcode_select.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +8 -2
- data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +5 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +17 -7
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +5 -0
- data/fastlane/lib/fastlane/commands_generator.rb +2 -1
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
- data/fastlane/lib/fastlane/fast_file.rb +18 -5
- data/fastlane/lib/fastlane/features.rb +3 -0
- data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
- data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +0 -9
- data/fastlane/lib/fastlane/lane_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
- data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +54 -1
- data/fastlane/lib/fastlane/tools.rb +18 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +2 -2
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +8 -4
- data/fastlane/swift/Fastlane.swift +604 -249
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +20 -8
- data/fastlane/swift/LaneFileProtocol.swift +3 -3
- data/fastlane/swift/MainProcess.swift +3 -3
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +25 -5
- data/fastlane/swift/OptionalConfigValue.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +14 -10
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +35 -11
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +5 -5
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +12 -8
- data/fastlane/swift/SocketClient.swift +9 -5
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -2
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +47 -24
- data/fastlane/swift/main.swift +1 -1
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/README.md +1 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +74 -17
- data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +10 -5
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +409 -26
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
- data/fastlane_core/lib/fastlane_core/project.rb +19 -2
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -2
- data/frameit/lib/frameit/device.rb +1 -1
- data/frameit/lib/frameit/device_types.rb +9 -0
- data/frameit/lib/frameit/editor.rb +16 -18
- data/frameit/lib/frameit/frame_downloader.rb +1 -1
- data/frameit/lib/frameit/trim_box.rb +6 -0
- data/gym/lib/gym/generators/build_command_generator.rb +70 -23
- data/gym/lib/gym/options.rb +30 -5
- data/match/lib/match/change_password.rb +2 -0
- data/match/lib/match/commands_generator.rb +2 -1
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/encryption.rb +3 -0
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/importer.rb +11 -1
- data/match/lib/match/migrate.rb +4 -3
- data/match/lib/match/module.rb +54 -2
- data/match/lib/match/nuke.rb +115 -47
- data/match/lib/match/options.rb +27 -1
- data/match/lib/match/runner.rb +26 -6
- data/match/lib/match/setup.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +5 -2
- data/match/lib/match/storage/gitlab/client.rb +102 -0
- data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
- data/match/lib/match/storage/gitlab_secure_files.rb +188 -0
- data/match/lib/match/storage/google_cloud_storage.rb +7 -6
- data/match/lib/match/storage/s3_storage.rb +3 -3
- data/match/lib/match/storage.rb +4 -0
- data/match/lib/match/table_printer.rb +2 -1
- data/match/lib/match/utils.rb +15 -2
- data/pem/lib/pem/manager.rb +32 -8
- data/pem/lib/pem/options.rb +10 -1
- data/pilot/lib/pilot/build_manager.rb +34 -14
- data/pilot/lib/pilot/options.rb +6 -1
- data/scan/lib/scan/detect_values.rb +14 -1
- data/scan/lib/scan/error_handler.rb +9 -0
- data/scan/lib/scan/options.rb +54 -9
- data/scan/lib/scan/runner.rb +171 -25
- data/scan/lib/scan/test_command_generator.rb +65 -5
- data/screengrab/lib/screengrab/options.rb +2 -2
- data/sigh/lib/assets/resign.sh +8 -5
- data/sigh/lib/sigh/download_all.rb +14 -2
- data/sigh/lib/sigh/module.rb +3 -1
- data/sigh/lib/sigh/options.rb +5 -0
- data/sigh/lib/sigh/runner.rb +12 -2
- data/snapshot/lib/assets/SnapshotHelper.swift +3 -3
- data/snapshot/lib/snapshot/latest_os_version.rb +2 -5
- data/snapshot/lib/snapshot/options.rb +24 -8
- data/snapshot/lib/snapshot/reports_generator.rb +9 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -3
- data/snapshot/lib/snapshot/test_command_generator.rb +37 -2
- data/spaceship/lib/spaceship/client.rb +71 -40
- data/spaceship/lib/spaceship/commands_generator.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
- data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +52 -6
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -10
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -2
- data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +47 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +23 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +33 -2
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -3
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +124 -8
- data/spaceship/lib/spaceship/connect_api.rb +9 -0
- data/spaceship/lib/spaceship/errors.rb +34 -0
- data/spaceship/lib/spaceship/globals.rb +9 -0
- data/spaceship/lib/spaceship/hashcash.rb +52 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +4 -3
- data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +6 -6
- data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes.rb +0 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +79 -21
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -3
- data/spaceship/lib/spaceship.rb +1 -0
- data/supply/lib/supply/client.rb +5 -10
- data/supply/lib/supply/options.rb +8 -0
- data/supply/lib/supply/uploader.rb +7 -3
- data/trainer/lib/assets/junit.xml.erb +28 -0
- data/trainer/lib/trainer/commands_generator.rb +51 -0
- data/trainer/lib/trainer/junit_generator.rb +31 -0
- data/trainer/lib/trainer/module.rb +10 -0
- data/trainer/lib/trainer/options.rb +66 -0
- data/trainer/lib/trainer/test_parser.rb +398 -0
- data/trainer/lib/trainer/xcresult.rb +403 -0
- data/trainer/lib/trainer.rb +7 -0
- metadata +73 -37
- data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -15
@@ -86,11 +86,13 @@ module FastlaneCore
|
|
86
86
|
|
87
87
|
def header(message)
|
88
88
|
format = format_string
|
89
|
-
|
89
|
+
# clamp to zero to prevent negative argument error below
|
90
|
+
available_width = [0, TTY::Screen.width - format.length].max
|
91
|
+
if message.length + 8 < available_width
|
90
92
|
message = "--- #{message} ---"
|
91
93
|
i = message.length
|
92
94
|
else
|
93
|
-
i =
|
95
|
+
i = available_width
|
94
96
|
end
|
95
97
|
success("-" * i)
|
96
98
|
success(message)
|
@@ -51,7 +51,7 @@ module Frameit
|
|
51
51
|
found_device = nil
|
52
52
|
filename_device = nil
|
53
53
|
filename = Pathname.new(path).basename.to_s
|
54
|
-
Devices.constants.
|
54
|
+
Devices.constants.sort_by(&:length).reverse_each do |c|
|
55
55
|
device = Devices.const_get(c)
|
56
56
|
next unless device.resolutions.include?(size)
|
57
57
|
# assign to filename_device if the filename contains the formatted name / id and its priority is higher than the current filename_device
|
@@ -47,6 +47,10 @@ module Frameit
|
|
47
47
|
PURPLE ||= "Purple"
|
48
48
|
GRAPHITE ||= "Graphite"
|
49
49
|
PACIFIC_BLUE ||= "Pacific Blue"
|
50
|
+
MIDNIGHT ||= "Midnight"
|
51
|
+
STARLIGHT ||= "Starlight"
|
52
|
+
SIERRA ||= "Sierra"
|
53
|
+
SORTA_SAGE ||= "Sorta Sage"
|
50
54
|
|
51
55
|
def self.all_colors
|
52
56
|
Color.constants.map { |c| Color.const_get(c).upcase.gsub(' ', '_') }
|
@@ -82,6 +86,7 @@ module Frameit
|
|
82
86
|
# Google Pixel 4's priority should be higher than Samsung Galaxy S10+ (priority 8):
|
83
87
|
GOOGLE_PIXEL_4 ||= Frameit::Device.new("google-pixel-4", "Google Pixel 4", 9, [[1080, 2280], [2280, 1080]], 444, Color::JUST_BLACK, Platform::ANDROID)
|
84
88
|
GOOGLE_PIXEL_4_XL ||= Frameit::Device.new("google-pixel-4-xl", "Google Pixel 4 XL", 9, [[1440, 3040], [3040, 1440]], 537, Color::JUST_BLACK, Platform::ANDROID)
|
89
|
+
GOOGLE_PIXEL_5 ||= Frameit::Device.new("google-pixel-5", "Google Pixel 5", 10, [[1080, 2340], [2340, 1080]], 432, Color::JUST_BLACK, Platform::ANDROID)
|
85
90
|
HTC_ONE_A9 ||= Frameit::Device.new("htc-one-a9", "HTC One A9", 6, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
|
86
91
|
HTC_ONE_M8 ||= Frameit::Device.new("htc-one-m8", "HTC One M8", 3, [[1080, 1920], [1920, 1080]], 441, Color::BLACK, Platform::ANDROID)
|
87
92
|
HUAWEI_P8 ||= Frameit::Device.new("huawei-p8", "Huawei P8", 5, [[1080, 1920], [1920, 1080]], 424, Color::BLACK, Platform::ANDROID)
|
@@ -124,6 +129,10 @@ module Frameit
|
|
124
129
|
IPHONE_12_PRO ||= Frameit::Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
|
125
130
|
IPHONE_12_PRO_MAX ||= Frameit::Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
|
126
131
|
IPHONE_12_MINI ||= Frameit::Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
|
132
|
+
IPHONE_13 ||= Frameit::Device.new("iphone-13", "Apple iPhone 13", 11, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
|
133
|
+
IPHONE_13_PRO ||= Frameit::Device.new("iphone-13-pro", "Apple iPhone 13 Pro", 11, [[1170, 2532], [2532, 1170]], 460, Color::GRAPHITE, Platform::IOS)
|
134
|
+
IPHONE_13_PRO_MAX ||= Frameit::Device.new("iphone13-pro-max", "Apple iPhone 13 Pro Max", 11, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
|
135
|
+
IPHONE_13_MINI ||= Frameit::Device.new("iphone-13-mini", "Apple iPhone 13 Mini", 11, [[1080, 2340], [2340, 1080]], 476, Color::MIDNIGHT, Platform::IOS)
|
127
136
|
IPAD_10_2 ||= Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
|
128
137
|
IPAD_AIR_2 ||= Frameit::Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD)
|
129
138
|
IPAD_AIR_2019 ||= Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
|
@@ -467,26 +467,24 @@ module Frameit
|
|
467
467
|
# Get matching trim box:
|
468
468
|
trim_box = trim_boxes[key]
|
469
469
|
|
470
|
-
#
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
end
|
470
|
+
# Adjust the trim box based on top_vertical_trim_offset and bottom_vertical_trim_offset to maintain the text baseline:
|
471
|
+
# Determine the trim area by maintaining the same vertical top offset based on the smallest value from all trim boxes (top_vertical_trim_offset).
|
472
|
+
# When the vertical top offset is larger than the smallest vertical top offset, the trim box needs to be adjusted:
|
473
|
+
if trim_box.offset_y > top_vertical_trim_offset
|
474
|
+
# Increase the height of the trim box with the difference in vertical top offset:
|
475
|
+
trim_box.height += trim_box.offset_y - top_vertical_trim_offset
|
476
|
+
# Change the vertical top offset to match that of the others:
|
477
|
+
trim_box.offset_y = top_vertical_trim_offset
|
478
|
+
|
479
|
+
UI.verbose("Trim box for key \"#{key}\" is adjusted to align top: #{trim_box.json_string_format}")
|
480
|
+
end
|
482
481
|
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
482
|
+
# Check if the height needs to be adjusted to reach the bottom offset:
|
483
|
+
if (trim_box.offset_y + trim_box.height) < bottom_vertical_trim_offset
|
484
|
+
# Set the height of the trim box to the difference between vertical bottom and top offset:
|
485
|
+
trim_box.height = bottom_vertical_trim_offset - trim_box.offset_y
|
487
486
|
|
488
|
-
|
489
|
-
end
|
487
|
+
UI.verbose("Trim box for key \"#{key}\" is adjusted to align bottom: #{trim_box.json_string_format}")
|
490
488
|
end
|
491
489
|
|
492
490
|
# Crop image with (adjusted) trim box parameters in MiniMagick string format:
|
@@ -53,7 +53,7 @@ module Frameit
|
|
53
53
|
|
54
54
|
def print_disclaimer
|
55
55
|
UI.header("Device frames disclaimer")
|
56
|
-
UI.important("All used device frames are available via Facebook Design:
|
56
|
+
UI.important("All used device frames are available via Facebook Design: https://design.facebook.com/toolsandresources/devices/")
|
57
57
|
UI.message("----------------------------------------")
|
58
58
|
UI.message("While Facebook has redrawn and shares these assets for the benefit")
|
59
59
|
UI.message("of the design community, Facebook does not own any of the underlying")
|
@@ -31,5 +31,11 @@ module Frameit
|
|
31
31
|
# Convert trim box parameters to string with syntax: "<width>x<height>+<offset_x>+<offset_y>":
|
32
32
|
return "#{@width}x#{@height}+#{@offset_x}+#{@offset_y}"
|
33
33
|
end
|
34
|
+
|
35
|
+
# Get the trimbox parameters in a human readable JSON string format
|
36
|
+
def json_string_format
|
37
|
+
# Create a JSON string from the trim box parameters:
|
38
|
+
return "{\"width\" : #{@width}, \"height\" : #{@height} , \"offset_x\" : #{@offset_x}, \"offset_y\" : #{@offset_y}}"
|
39
|
+
end
|
34
40
|
end
|
35
41
|
end
|
@@ -7,7 +7,7 @@ module Gym
|
|
7
7
|
class << self
|
8
8
|
def generate
|
9
9
|
parts = prefix
|
10
|
-
parts <<
|
10
|
+
parts << Gym.config[:xcodebuild_command]
|
11
11
|
parts += options
|
12
12
|
parts += buildactions
|
13
13
|
parts += setting
|
@@ -39,11 +39,12 @@ module Gym
|
|
39
39
|
options << "-destination '#{config[:destination]}'" if config[:destination]
|
40
40
|
options << "-archivePath #{archive_path.shellescape}" unless config[:skip_archive]
|
41
41
|
options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
|
42
|
+
options << "-showBuildTimingSummary" if config[:build_timing_summary]
|
42
43
|
if config[:use_system_scm] && !options.include?("-scmProvider system")
|
43
44
|
options << "-scmProvider system"
|
44
45
|
end
|
45
46
|
options << config[:xcargs] if config[:xcargs]
|
46
|
-
options << "OTHER_SWIFT_FLAGS=\"-Xfrontend -debug-time-function-bodies\"" if config[:analyze_build_time]
|
47
|
+
options << "OTHER_SWIFT_FLAGS=\"\\\$(value) -Xfrontend -debug-time-function-bodies\"" if config[:analyze_build_time]
|
47
48
|
|
48
49
|
options
|
49
50
|
end
|
@@ -72,32 +73,78 @@ module Gym
|
|
72
73
|
def pipe
|
73
74
|
pipe = []
|
74
75
|
pipe << "| tee #{xcodebuild_log_path.shellescape}"
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
pipe << report_output_html.shellescape
|
92
|
-
elsif report_output_json
|
93
|
-
pipe << " --report json-compilation-database --output "
|
94
|
-
pipe << report_output_json.shellescape
|
95
|
-
end
|
76
|
+
|
77
|
+
formatter = Gym.config[:xcodebuild_formatter].chomp
|
78
|
+
options = legacy_xcpretty_options
|
79
|
+
|
80
|
+
if Gym.config[:disable_xcpretty] || formatter == ''
|
81
|
+
UI.verbose("Not using an xcodebuild formatter")
|
82
|
+
elsif !options.empty?
|
83
|
+
UI.important("Detected legacy xcpretty being used so formatting wth xcpretty")
|
84
|
+
UI.important("Option(s) used: #{options.join(', ')}")
|
85
|
+
pipe += pipe_xcpretty
|
86
|
+
elsif formatter == 'xcpretty'
|
87
|
+
pipe += pipe_xcpretty
|
88
|
+
elsif formatter == 'xcbeautify'
|
89
|
+
pipe += pipe_xcbeautify
|
90
|
+
else
|
91
|
+
pipe << "| #{formatter}"
|
96
92
|
end
|
93
|
+
|
97
94
|
pipe << "> /dev/null" if Gym.config[:suppress_xcode_output]
|
98
95
|
pipe
|
99
96
|
end
|
100
97
|
|
98
|
+
def pipe_xcbeautify
|
99
|
+
pipe = ['| xcbeautify']
|
100
|
+
|
101
|
+
if FastlaneCore::Helper.colors_disabled?
|
102
|
+
pipe << '--disable-colored-output'
|
103
|
+
end
|
104
|
+
|
105
|
+
return pipe
|
106
|
+
end
|
107
|
+
|
108
|
+
def legacy_xcpretty_options
|
109
|
+
options = []
|
110
|
+
|
111
|
+
options << "xcpretty_test_format" if Gym.config[:xcpretty_test_format]
|
112
|
+
options << "xcpretty_formatter" if Gym.config[:xcpretty_formatter]
|
113
|
+
options << "xcpretty_report_junit" if Gym.config[:xcpretty_report_junit]
|
114
|
+
options << "xcpretty_report_html" if Gym.config[:xcpretty_report_html]
|
115
|
+
options << "xcpretty_report_json" if Gym.config[:xcpretty_report_json]
|
116
|
+
options << "xcpretty_utf" if Gym.config[:xcpretty_utf]
|
117
|
+
|
118
|
+
return options
|
119
|
+
end
|
120
|
+
|
121
|
+
def pipe_xcpretty
|
122
|
+
pipe = []
|
123
|
+
|
124
|
+
formatter = Gym.config[:xcpretty_formatter]
|
125
|
+
pipe << "| xcpretty"
|
126
|
+
pipe << " --test" if Gym.config[:xcpretty_test_format]
|
127
|
+
pipe << " --no-color" if Helper.colors_disabled?
|
128
|
+
pipe << " --formatter " if formatter
|
129
|
+
pipe << formatter if formatter
|
130
|
+
pipe << "--utf" if Gym.config[:xcpretty_utf]
|
131
|
+
report_output_junit = Gym.config[:xcpretty_report_junit]
|
132
|
+
report_output_html = Gym.config[:xcpretty_report_html]
|
133
|
+
report_output_json = Gym.config[:xcpretty_report_json]
|
134
|
+
if report_output_junit
|
135
|
+
pipe << " --report junit --output "
|
136
|
+
pipe << report_output_junit.shellescape
|
137
|
+
elsif report_output_html
|
138
|
+
pipe << " --report html --output "
|
139
|
+
pipe << report_output_html.shellescape
|
140
|
+
elsif report_output_json
|
141
|
+
pipe << " --report json-compilation-database --output "
|
142
|
+
pipe << report_output_json.shellescape
|
143
|
+
end
|
144
|
+
|
145
|
+
pipe
|
146
|
+
end
|
147
|
+
|
101
148
|
def post_build
|
102
149
|
commands = []
|
103
150
|
commands << %{grep -E '^[0-9.]+ms' #{xcodebuild_log_path.shellescape} | grep -vE '^0\.[0-9]' | sort -nr > culprits.txt} if Gym.config[:analyze_build_time]
|
data/gym/lib/gym/options.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'fastlane/helper/xcodebuild_formatter_helper'
|
2
3
|
require 'credentials_manager/appfile_config'
|
3
4
|
require_relative 'module'
|
4
5
|
|
@@ -230,8 +231,25 @@ module Gym
|
|
230
231
|
description: "Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path",
|
231
232
|
optional: true,
|
232
233
|
type: Boolean),
|
234
|
+
|
235
|
+
FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
|
236
|
+
env_names: ["GYM_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
|
237
|
+
description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)",
|
238
|
+
type: String,
|
239
|
+
default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
|
240
|
+
default_value_dynamic: true),
|
241
|
+
|
242
|
+
FastlaneCore::ConfigItem.new(key: :build_timing_summary,
|
243
|
+
env_name: "GYM_BUILD_TIMING_SUMMARY",
|
244
|
+
description: "Create a build timing summary",
|
245
|
+
type: Boolean,
|
246
|
+
default_value: false,
|
247
|
+
optional: true),
|
248
|
+
|
249
|
+
# xcpretty
|
233
250
|
FastlaneCore::ConfigItem.new(key: :disable_xcpretty,
|
234
251
|
env_name: "DISABLE_XCPRETTY",
|
252
|
+
deprecated: "Use `xcodebuild_formatter: ''` instead",
|
235
253
|
description: "Disable xcpretty formatting of build output",
|
236
254
|
optional: true,
|
237
255
|
type: Boolean),
|
@@ -259,22 +277,29 @@ module Gym
|
|
259
277
|
env_name: "XCPRETTY_REPORT_JSON",
|
260
278
|
description: "Have xcpretty create a JSON compilation database at the provided path",
|
261
279
|
optional: true),
|
262
|
-
FastlaneCore::ConfigItem.new(key: :analyze_build_time,
|
263
|
-
env_name: "GYM_ANALYZE_BUILD_TIME",
|
264
|
-
description: "Analyze the project build time and store the output in 'culprits.txt' file",
|
265
|
-
optional: true,
|
266
|
-
type: Boolean),
|
267
280
|
FastlaneCore::ConfigItem.new(key: :xcpretty_utf,
|
268
281
|
env_name: "XCPRETTY_UTF",
|
269
282
|
description: "Have xcpretty use unicode encoding when reporting builds",
|
270
283
|
optional: true,
|
271
284
|
type: Boolean),
|
285
|
+
|
286
|
+
FastlaneCore::ConfigItem.new(key: :analyze_build_time,
|
287
|
+
env_name: "GYM_ANALYZE_BUILD_TIME",
|
288
|
+
description: "Analyze the project build time and store the output in 'culprits.txt' file",
|
289
|
+
optional: true,
|
290
|
+
type: Boolean),
|
272
291
|
FastlaneCore::ConfigItem.new(key: :skip_profile_detection,
|
273
292
|
env_name: "GYM_SKIP_PROFILE_DETECTION",
|
274
293
|
description: "Do not try to build a profile mapping from the xcodeproj. Match or a manually provided mapping should be used",
|
275
294
|
optional: true,
|
276
295
|
type: Boolean,
|
277
296
|
default_value: false),
|
297
|
+
FastlaneCore::ConfigItem.new(key: :xcodebuild_command,
|
298
|
+
env_name: "GYM_XCODE_BUILD_COMMAND",
|
299
|
+
description: "Allows for override of the default `xcodebuild` command",
|
300
|
+
type: String,
|
301
|
+
optional: true,
|
302
|
+
default_value: "xcodebuild"),
|
278
303
|
FastlaneCore::ConfigItem.new(key: :cloned_source_packages_path,
|
279
304
|
env_name: "GYM_CLONED_SOURCE_PACKAGES_PATH",
|
280
305
|
description: "Sets a custom path for Swift Package Manager dependencies",
|
@@ -42,6 +42,8 @@ module Match
|
|
42
42
|
message = "[fastlane] Changed passphrase"
|
43
43
|
files_to_commit = encryption.encrypt_files(password: new_password)
|
44
44
|
storage.save_changes!(files_to_commit: files_to_commit, custom_message: message)
|
45
|
+
ensure
|
46
|
+
storage.clear_changes if storage
|
45
47
|
end
|
46
48
|
|
47
49
|
def self.ensure_ui_interactive
|
@@ -155,7 +155,8 @@ module Match
|
|
155
155
|
FastlaneCore::CommanderGenerator.new.generate(Match::Options.available_options, command: c)
|
156
156
|
|
157
157
|
c.action do |args, options|
|
158
|
-
Match::
|
158
|
+
params = FastlaneCore::Configuration.create(Match::Options.available_options, options.__hash__)
|
159
|
+
Match::Migrate.new.migrate(params)
|
159
160
|
end
|
160
161
|
end
|
161
162
|
|
@@ -135,7 +135,7 @@ module Match
|
|
135
135
|
UI.crash!("Error encrypting '#{path}'")
|
136
136
|
end
|
137
137
|
|
138
|
-
# The encryption parameters in this implementations reflect the old
|
138
|
+
# The encryption parameters in this implementations reflect the old behavior which depended on the users' local OpenSSL version
|
139
139
|
# 1.0.x OpenSSL and earlier versions use MD5, 1.1.0c and newer uses SHA256, we try both before giving an error
|
140
140
|
def decrypt_specific_file(path: nil, password: nil, hash_algorithm: "MD5")
|
141
141
|
stored_data = Base64.decode64(File.read(path))
|
@@ -90,6 +90,7 @@ module Match
|
|
90
90
|
template_name: params[:template_name],
|
91
91
|
fail_on_name_taken: params[:fail_on_name_taken],
|
92
92
|
include_all_certificates: params[:include_all_certificates],
|
93
|
+
include_mac_in_profiles: params[:include_mac_in_profiles],
|
93
94
|
}
|
94
95
|
|
95
96
|
values[:platform] = params[:platform]
|
data/match/lib/match/importer.rb
CHANGED
@@ -31,11 +31,14 @@ module Match
|
|
31
31
|
google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
|
32
32
|
google_cloud_keys_file: params[:google_cloud_keys_file].to_s,
|
33
33
|
google_cloud_project_id: params[:google_cloud_project_id].to_s,
|
34
|
+
skip_google_cloud_account_confirmation: params[:skip_google_cloud_account_confirmation],
|
34
35
|
s3_bucket: params[:s3_bucket],
|
35
36
|
s3_region: params[:s3_region],
|
36
37
|
s3_access_key: params[:s3_access_key],
|
37
38
|
s3_secret_access_key: params[:s3_secret_access_key],
|
38
39
|
s3_object_prefix: params[:s3_object_prefix],
|
40
|
+
gitlab_project: params[:gitlab_project],
|
41
|
+
gitlab_host: params[:gitlab_host],
|
39
42
|
readonly: params[:readonly],
|
40
43
|
username: params[:username],
|
41
44
|
team_id: params[:team_id],
|
@@ -71,12 +74,17 @@ module Match
|
|
71
74
|
].join(',')
|
72
75
|
when :developer_id_application
|
73
76
|
certificate_type = [
|
74
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION
|
77
|
+
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION,
|
78
|
+
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION_G2
|
75
79
|
].join(',')
|
76
80
|
when :mac_installer_distribution
|
77
81
|
certificate_type = [
|
78
82
|
Spaceship::ConnectAPI::Certificate::CertificateType::MAC_INSTALLER_DISTRIBUTION
|
79
83
|
].join(',')
|
84
|
+
when :developer_id_installer
|
85
|
+
certificate_type = [
|
86
|
+
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_INSTALLER
|
87
|
+
].join(',')
|
80
88
|
else
|
81
89
|
UI.user_error!("Cert type '#{cert_type}' is not supported")
|
82
90
|
end
|
@@ -141,6 +149,8 @@ module Match
|
|
141
149
|
# Encrypt and commit
|
142
150
|
encryption.encrypt_files if encryption
|
143
151
|
storage.save_changes!(files_to_commit: files_to_commit)
|
152
|
+
ensure
|
153
|
+
storage.clear_changes if storage
|
144
154
|
end
|
145
155
|
|
146
156
|
def ensure_valid_file_path(file_path, file_description, file_extension, optional: false)
|
data/match/lib/match/migrate.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require_relative 'options'
|
2
1
|
require_relative 'spaceship_ensure'
|
3
2
|
require_relative 'encryption'
|
4
3
|
require_relative 'storage'
|
@@ -7,8 +6,7 @@ require 'fileutils'
|
|
7
6
|
|
8
7
|
module Match
|
9
8
|
class Migrate
|
10
|
-
def migrate(
|
11
|
-
params = FastlaneCore::Configuration.create(Match::Options.available_options, options.__hash__)
|
9
|
+
def migrate(params)
|
12
10
|
loaded_matchfile = params.load_configuration_file("Matchfile")
|
13
11
|
|
14
12
|
ensure_parameters_are_valid(params)
|
@@ -88,6 +86,9 @@ module Match
|
|
88
86
|
UI.success("You can also remove the `git_url`, as well as any other git related configurations from your Fastfile and Matchfile")
|
89
87
|
UI.message("")
|
90
88
|
UI.input("Please make sure to read the above and confirm with enter")
|
89
|
+
ensure
|
90
|
+
google_cloud_storage.clear_changes if google_cloud_storage
|
91
|
+
git_storage.clear_changes if git_storage
|
91
92
|
end
|
92
93
|
|
93
94
|
def api_token(params)
|
data/match/lib/match/module.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'spaceship'
|
2
|
+
|
1
3
|
require 'fastlane_core/helper'
|
2
4
|
require 'fastlane/boolean'
|
3
5
|
|
@@ -9,11 +11,11 @@ module Match
|
|
9
11
|
DESCRIPTION = "Easily sync your certificates and profiles across your team"
|
10
12
|
|
11
13
|
def self.environments
|
12
|
-
return %w(appstore adhoc development enterprise developer_id mac_installer_distribution)
|
14
|
+
return %w(appstore adhoc development enterprise developer_id mac_installer_distribution developer_id_installer)
|
13
15
|
end
|
14
16
|
|
15
17
|
def self.storage_modes
|
16
|
-
return %w(git google_cloud s3)
|
18
|
+
return %w(git google_cloud s3 gitlab_secure_files)
|
17
19
|
end
|
18
20
|
|
19
21
|
def self.profile_type_sym(type)
|
@@ -30,4 +32,54 @@ module Match
|
|
30
32
|
return :distribution if ["adhoc", "appstore", "distribution"].include?(type)
|
31
33
|
raise "Unknown cert type: '#{type}'"
|
32
34
|
end
|
35
|
+
|
36
|
+
# Converts provisioning profile type (i.e. development, enterprise) to an array of profile types
|
37
|
+
# That can be used for filtering when using Spaceship::ConnectAPI::Profile API
|
38
|
+
def self.profile_types(prov_type)
|
39
|
+
case prov_type.to_sym
|
40
|
+
when :appstore
|
41
|
+
return [
|
42
|
+
Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_STORE,
|
43
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE,
|
44
|
+
Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_STORE,
|
45
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE
|
46
|
+
]
|
47
|
+
when :development
|
48
|
+
return [
|
49
|
+
Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT,
|
50
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT,
|
51
|
+
Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT,
|
52
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT
|
53
|
+
]
|
54
|
+
when :enterprise
|
55
|
+
profiles = [
|
56
|
+
Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE,
|
57
|
+
Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE
|
58
|
+
]
|
59
|
+
|
60
|
+
# As of 2022-06-25, only available with Apple ID auth
|
61
|
+
if Spaceship::ConnectAPI.token
|
62
|
+
UI.important("Skipping #{Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE} and #{Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE}... only available with Apple ID auth")
|
63
|
+
else
|
64
|
+
profiles += [
|
65
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE,
|
66
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
return profiles
|
71
|
+
when :adhoc
|
72
|
+
return [
|
73
|
+
Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC,
|
74
|
+
Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC
|
75
|
+
]
|
76
|
+
when :developer_id
|
77
|
+
return [
|
78
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT,
|
79
|
+
Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT
|
80
|
+
]
|
81
|
+
else
|
82
|
+
raise "Unknown provisioning type '#{prov_type}'"
|
83
|
+
end
|
84
|
+
end
|
33
85
|
end
|