Whoops

Piotr Osiewicz created

Change summary

script/build-mac | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

Detailed changes

script/build-mac 🔗

@@ -104,6 +104,7 @@ else
     cargo build ${build_flag} --package remote_server     --target aarch64-apple-darwin --target x86_64-apple-darwin
 fi
 
+
 echo "Creating application bundle"
 pushd crates/zed
 cp Cargo.toml Cargo.toml.backup
@@ -114,19 +115,23 @@ sed \
 
 if [ "$local_arch" = true ]; then
     app_path=$(cargo bundle ${build_flag} --select-workspace-root | xargs)
-    cp -R target/${target_dir}/cli "${app_path}/Contents/MacOS/"
 else
     app_path_x64=$(cargo bundle ${build_flag} --target x86_64-apple-darwin --select-workspace-root | xargs)
     app_path_aarch64=$(cargo bundle ${build_flag} --target aarch64-apple-darwin --select-workspace-root | xargs)
     app_path=$app_path_x64
-    prepare_binaries "aarch64-apple-darwin" "$app_path_aarch64"
-    prepare_binaries "x86_64-apple-darwin" "$app_path_x64"
 fi
 
 mv Cargo.toml.backup Cargo.toml
 popd
 echo "Built ${app_path}"
 
+if [ "$local_arch" = true ]; then
+    cp -R target/${target_dir}/cli "${app_path}/Contents/MacOS/"
+else
+    prepare_binaries "aarch64-apple-darwin" "$app_path_aarch64"
+    prepare_binaries "x86_64-apple-darwin" "$app_path_x64"
+fi
+
 function upload_debug_info() {
     architecture=$1
     if [[ -n "${SENTRY_AUTH_TOKEN:-}" ]]; then