Remove existing gzip files before compressing dSYMs (#7818)

Antonio Scandurra created

This should fix the build.

Release Notes:

- N/A

Change summary

.github/workflows/ci.yml |  4 ++--
script/bundle            | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)

Detailed changes

.github/workflows/ci.yml 🔗

@@ -125,12 +125,12 @@ jobs:
             - name: Build Zed
               run: cargo build -p zed
     bundle:
-        name: Bundle app
+        name: Bundle macOS app
         runs-on:
             - self-hosted
             - bundle
         if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-build-dmg') }}
-        needs: [macos_tests, linux_tests]
+        needs: [macos_tests]
         env:
             MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
             MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}

script/bundle 🔗

@@ -40,7 +40,7 @@ function uploadDsym
   acl="x-amz-acl:public-read"
   content_type="application/octet-stream"
   storage_type="x-amz-storage-class:STANDARD"
-  string="PUT\n\n${content_type}\n${date}\n${acl}\n${storage_type}\n/${SPACE}/${space_path}/${file_name}"
+  string="PUT\n\n${content_type}\n${date}\n${acl}\n${storage_type}\n/${SPACE}/${file_name}"
   signature=$(echo -en "${string}" | openssl sha1 -hmac "${DIGITALOCEAN_SPACES_SECRET_KEY}" -binary | base64)
 
   curl --fail -vv -s -X PUT -T "$file_to_upload" \
@@ -141,8 +141,16 @@ if [ "$local_arch" = false ]; then
     if [ "$channel" == "nightly" ]; then
         version="$version-$(git rev-parse --short HEAD)"
     fi
+
+    echo "Removing existing gzipped dSYMs"
+    rm -f target/aarch64-apple-darwin/release/Zed.dwarf.gz
+    rm -f target/x86_64-apple-darwin/release/Zed.dwarf.gz
+
+    echo "Gzipping dSYMs"
     gzip target/aarch64-apple-darwin/release/Zed.dwarf
     gzip target/x86_64-apple-darwin/release/Zed.dwarf
+
+    echo "Uploading dSYMs"
     uploadDsym target/aarch64-apple-darwin/release/Zed.dwarf.gz "$channel/Zed-$version-aarch64-apple-darwin.dwarf.gz"
     uploadDsym target/x86_64-apple-darwin/release/Zed.dwarf.gz "$channel/Zed-$version-x86_64-apple-darwin.dwarf.gz"