Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

chore: Do not produce universal binaries for our releases (#21014)

Piotr Osiewicz5ee5a1a51e37
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8f2f08aa1aa..49881e2e7cb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -272,18 +272,12 @@ jobs:
- name: Create macOS app bundle
run: script/bundle-mac
- - name: Rename single-architecture binaries
+ - name: Rename binaries
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
run: |
mv target/aarch64-apple-darwin/release/Zed.dmg target/aarch64-apple-darwin/release/Zed-aarch64.dmg
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
- - name: Upload app bundle (universal) to workflow run if main branch or specific label
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
- if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
- with:
- name: Zed_${{ github.event.pull_request.head.sha || github.sha }}.dmg
- path: target/release/Zed.dmg
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
@@ -309,7 +303,6 @@ jobs:
target/zed-remote-server-macos-aarch64.gz
target/aarch64-apple-darwin/release/Zed-aarch64.dmg
target/x86_64-apple-darwin/release/Zed-x86_64.dmg
- target/release/Zed.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/script/bundle-mac b/script/bundle-mac
index 06231a22abd..54247645ccf 100755
--- a/script/bundle-mac
+++ b/script/bundle-mac
@@ -172,11 +172,6 @@ function download_git() {
x86_64-apple-darwin)
download_and_unpack "https://github.com/desktop/dugite-native/releases/download/${GIT_VERSION}/dugite-native-${GIT_VERSION}-${GIT_VERSION_SHA}-macOS-x64.tar.gz" bin/git ./git
;;
- universal)
- download_and_unpack "https://github.com/desktop/dugite-native/releases/download/${GIT_VERSION}/dugite-native-${GIT_VERSION}-${GIT_VERSION_SHA}-macOS-arm64.tar.gz" bin/git ./git_arm64
- download_and_unpack "https://github.com/desktop/dugite-native/releases/download/${GIT_VERSION}/dugite-native-${GIT_VERSION}-${GIT_VERSION_SHA}-macOS-x64.tar.gz" bin/git ./git_x64
- lipo -create ./git_arm64 ./git_x64 -output ./git
- ;;
*)
echo "Unsupported architecture: $architecture"
exit 1
@@ -377,20 +372,7 @@ else
prepare_binaries "aarch64-apple-darwin" "$app_path_aarch64"
prepare_binaries "x86_64-apple-darwin" "$app_path_x64"
- cp -R "$app_path_x64" target/release/
- app_path=target/release/$(basename "$app_path_x64")
- lipo \
- -create \
- target/{x86_64-apple-darwin,aarch64-apple-darwin}/${target_dir}/zed \
- -output \
- "${app_path}/Contents/MacOS/zed"
- lipo \
- -create \
- target/{x86_64-apple-darwin,aarch64-apple-darwin}/${target_dir}/cli \
- -output \
- "${app_path}/Contents/MacOS/cli"
-
- sign_app_binaries "$app_path" "universal" "."
+
sign_app_binaries "$app_path_x64" "x86_64-apple-darwin" "x86_64-apple-darwin"
sign_app_binaries "$app_path_aarch64" "aarch64-apple-darwin" "aarch64-apple-darwin"
diff --git a/script/upload-nightly b/script/upload-nightly
index fd379419810..87ad712ae47 100755
--- a/script/upload-nightly
+++ b/script/upload-nightly
@@ -43,7 +43,6 @@ case "$target" in
macos)
upload_to_blob_store $bucket_name "target/aarch64-apple-darwin/release/Zed.dmg" "nightly/Zed-aarch64.dmg"
upload_to_blob_store $bucket_name "target/x86_64-apple-darwin/release/Zed.dmg" "nightly/Zed-x86_64.dmg"
- upload_to_blob_store $bucket_name "target/release/Zed.dmg" "nightly/Zed.dmg"
upload_to_blob_store $bucket_name "target/latest-sha" "nightly/latest-sha"
rm -f "target/aarch64-apple-darwin/release/Zed.dmg" "target/x86_64-apple-darwin/release/Zed.dmg" "target/release/Zed.dmg"
rm -f "target/latest-sha"