Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Try to identify dSYMs by UUID not channel (#28268)
Conrad Irwinf03efeda7388
diff --git a/script/bundle-mac b/script/bundle-macindex 9aa9763e9cc..2360f8106ca 100755--- a/script/bundle-mac+++ b/script/bundle-mac@@ -191,11 +191,13 @@ function prepare_binaries() {local app_path=$2echo "Unpacking dSYMs for $architecture"- if ! dsymutil --flat target/${architecture}/${target_dir}/Zed 2> target/dsymutil.log; then+ exe_path="target/${architecture}/${target_dir}/Zed"+ if ! dsymutil --flat "${exe_path}" 2> target/dsymutil.log; thenecho "dsymutil failed"cat target/dsymutil.logexit 1fi+ uuid=$(dwarfdump --uuid "${exe_path}" | cut -d ' ' -f 2 | tr 'A-F' 'a-f')version="$(cargo metadata --no-deps --manifest-path crates/zed/Cargo.toml --offline --format-version=1 | jq -r '.packages | map(select(.name == "zed"))[0].version')"if [ "$channel" == "nightly" ]; thenversion="$version-$(git rev-parse --short HEAD)"@@ -207,11 +209,11 @@ function prepare_binaries() {echo "Gzipping dSYMs for $architecture"gzip -f target/${architecture}/${target_dir}/Zed.dwarf- echo "Uploading dSYMs for $architecture"+ echo "Uploading dSYMs${architecture} for $architecture to by_uuid/${uuid}.dwarf.gz"upload_to_blob_store_public \"zed-debug-symbols" \target/${architecture}/${target_dir}/Zed.dwarf.gz \- "$channel/Zed-$version-${architecture}.dwarf.gz"+ "by-uuid/${uuid}.dwarf.gz"cp target/${architecture}/${target_dir}/zed "${app_path}/Contents/MacOS/zed"cp target/${architecture}/${target_dir}/cli "${app_path}/Contents/MacOS/cli"diff --git a/script/lib/blob-store.sh b/script/lib/blob-store.shindex ecfb6dbf952..2cc5c2a455c 100644--- a/script/lib/blob-store.sh+++ b/script/lib/blob-store.sh@@ -24,10 +24,10 @@ function upload_to_blob_store_with_aclfunction upload_to_blob_store_public{- upload_to_blob_store_with_acl $1 $2 $3 "x-amz-acl:public-read"+ upload_to_blob_store_with_acl "$1" "$2" "$3" "x-amz-acl:public-read"}function upload_to_blob_store{- upload_to_blob_store_with_acl $1 $2 $3 "x-amz-acl:private"+ upload_to_blob_store_with_acl "$1" "$2" "$3" "x-amz-acl:private"}diff --git a/script/symbolicate b/script/symbolicateindex 5a3c17fed3b..ab156fd68c3 100755--- a/script/symbolicate+++ b/script/symbolicate@@ -53,10 +53,18 @@ else # ips filemkdir -p target/dsyms/$channel- dsym="$channel/Zed-$version-$arch.dwarf"+ # NOTE: if you see "no such file --uuid", you need to update your symbolicate+ uuid=$(symbolicate $input_file --uuid || true)+ if [[ $? -ne 0 ]]; then+ echo "You need to update your symbolicate: cargo install symbolicate"+ exit 1+ fi++ dsym="$uuid.dwarf"if [[ ! -f target/dsyms/$dsym ]]; thenecho "Downloading $dsym..."- curl -o target/dsyms/$dsym.gz "https://zed-debug-symbols.nyc3.digitaloceanspaces.com/$channel/Zed-$version-$arch.dwarf.gz"+ curl -f -o target/dsyms/$dsym.gz "https://zed-debug-symbols.nyc3.digitaloceanspaces.com/by_uuid/${uuid}.dwarf.gz" ||+ curl -f -o target/dsyms/$dsym.gz "https://zed-debug-symbols.nyc3.digitaloceanspaces.com/$channel/Zed-$version-$arch.dwarf.gz"gunzip target/dsyms/$dsym.gzfi