Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
bundle: Restore local install on macOS (#41482)
claytonrcartere30d5998e47e
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.ymlindex a9d20e2d88a..63c882bf7b0 100644--- a/.github/workflows/run_tests.yml+++ b/.github/workflows/run_tests.yml@@ -46,7 +46,7 @@ jobs:echo "${output_name}=false" >> "$GITHUB_OUTPUT"}- check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask' -qP+ check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qPcheck_pattern "run_docs" '^docs/' -qPcheck_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qPcheck_pattern "run_nix" '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' -qPdiff --git a/script/bundle-mac b/script/bundle-macindex 3f895ec14b7..0b4c1285fb2 100755--- a/script/bundle-mac+++ b/script/bundle-mac@@ -6,8 +6,6 @@ source script/lib/blob-store.shbuild_flag="--release"target_dir="release"open_result=false-local_arch=false-local_only=falselocal_install=falsecan_code_sign=false@@ -196,10 +194,6 @@ function sign_app_binaries() {/usr/bin/codesign --force --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "$IDENTITY" "${app_path}" -velseecho "One or more of the following variables are missing: MACOS_CERTIFICATE, MACOS_CERTIFICATE_PASSWORD, APPLE_NOTARIZATION_KEY, APPLE_NOTARIZATION_KEY_ID, APPLE_NOTARIZATION_ISSUER_ID"- if [[ "$local_only" = false ]]; then- echo "To create a self-signed local build use ./scripts/build.sh -ldf"- exit 1- fiecho "====== WARNING ======"echo "This bundle is being signed without all entitlements, some features (e.g. universal links) will not work"@@ -215,7 +209,7 @@ function sign_app_binaries() {codesign --force --deep --entitlements "${app_path}/Contents/Resources/zed.entitlements" --sign ${MACOS_SIGNING_KEY:- -} "${app_path}" -vfi- if [[ "$target_dir" = "debug" && "$local_only" = false ]]; then+ if [[ "$target_dir" = "debug" ]]; thenif [ "$open_result" = true ]; thenopen "$app_path"else@@ -227,20 +221,13 @@ function sign_app_binaries() {bundle_name=$(basename "$app_path")- if [ "$local_only" = true ]; then- if [ "$local_install" = true ]; then- rm -rf "/Applications/$bundle_name"- mv "$app_path" "/Applications/$bundle_name"- echo "Installed application bundle: /Applications/$bundle_name"- if [ "$open_result" = true ]; then- echo "Opening /Applications/$bundle_name"- open "/Applications/$bundle_name"- fi- else- if [ "$open_result" = true ]; then- echo "Opening $app_path"- open "$app_path"- fi+ if [ "$local_install" = true ]; then+ rm -rf "/Applications/$bundle_name"+ mv "$app_path" "/Applications/$bundle_name"+ echo "Installed application bundle: /Applications/$bundle_name"+ if [ "$open_result" = true ]; then+ echo "Opening /Applications/$bundle_name"+ open "/Applications/$bundle_name"fielsedmg_target_directory="target/${target_triple}/${target_dir}"diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rsindex 8060bafa5aa..82b40f23d5b 100644--- a/tooling/xtask/src/tasks/workflows/run_tests.rs+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs@@ -25,7 +25,7 @@ pub(crate) fn run_tests() -> Workflow {let should_check_docs = PathCondition::new("run_docs", r"^docs/");let should_check_scripts = PathCondition::new("run_action_checks",- r"^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask",+ r"^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/",);let should_check_licences =PathCondition::new("run_licenses", r"^(Cargo.lock|script/.*licenses)");