Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix mac bundling errors (#9848)
Kirill Bulatov63f17c50b9f2
diff --git a/script/bundle-mac b/script/bundle-macindex 80cdb57170c..b83b51265dc 100755--- a/script/bundle-mac+++ b/script/bundle-mac@@ -1,6 +1,6 @@#!/usr/bin/env bash-set -euxo pipefail+set -euo pipefailsource script/lib/blob-store.shbuild_flag="--release"@@ -8,7 +8,7 @@ target_dir="release"open_result=falselocal_arch=falselocal_only=false-overwrite_local_app=false+local_install=falsebundle_name=""zed_crate="zed"binary_name="Zed"@@ -25,13 +25,13 @@ Build the application bundle for macOS.Options:-d Compile in debug mode-l Compile for local architecture and copy bundle to /Applications, implies -d.- -o Open the resulting DMG or the app itself in local mode.- -f Overwrite the local app bundle if it exists.+ -o Open dir with the resulting DMG or launch the app itself in local mode.+ -i Install the resulting DMG into /Applications in local mode. Noop without -l.-h Display this help and exit."}-while getopts 'dlfoh' flag+while getopts 'dloih' flagdocase "${flag}" ino) open_result=true;;@@ -49,7 +49,7 @@ dolocal_only=truetarget_dir="debug";;- f) overwrite_local_app=true;;+ i) local_install=true;;h)help_infoexit 0@@ -152,8 +152,8 @@ function sign_binaries() {if [ "$local_arch" = false ]; thencp -R target/${local_target_triple}/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"else- cp -R target/${architecture_dir}/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"- cp -R target/${architecture_dir}/${target_dir}/cli "${app_path}/Contents/MacOS/"+ cp -R target/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"+ cp -R target/${target_dir}/cli "${app_path}/Contents/MacOS/"fi# Note: The app identifier for our development builds is the same as the app identifier for nightly.@@ -218,16 +218,19 @@ function sign_binaries() {fiif [ "$local_only" = true ]; then- if [ "$overwrite_local_app" = true ]; then+ if [ "$local_install" = true ]; thenrm -rf "/Applications/$bundle_name"- fi- mv "$app_path" "/Applications/$bundle_name"-- if [ "$open_result" = true ]; then- open "/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"+ fielse- echo "Installed application bundle:"- echo "/Applications/$bundle_name"+ if [ "$open_result" = true ]; then+ echo "Opening $app_path"+ open "$app_path"+ fifielsedmg_target_directory="target/${architecture_dir}/${target_dir}"