From df708465d1ad0c48147bb59044ffb9987ab5c485 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 26 Oct 2022 21:06:06 -0700 Subject: [PATCH] Ensure only the just-built app bundle is included in the DMG --- script/bundle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script/bundle b/script/bundle index ed1d82c78b..113d47b525 100755 --- a/script/bundle +++ b/script/bundle @@ -28,10 +28,10 @@ sed \ -i .backup \ "s/package.metadata.bundle-${channel}/package.metadata.bundle/" \ Cargo.toml -rm -rf target/x86_64-apple-darwin/release/bundle app_path=$(cargo bundle --release --target x86_64-apple-darwin | xargs) mv Cargo.toml.backup Cargo.toml popd +echo "Bundled ${app_path}" echo "Creating fat binaries" lipo \ @@ -67,8 +67,10 @@ else fi echo "Creating DMG" -mkdir -p target/release -hdiutil create -volname Zed -srcfolder target/x86_64-apple-darwin/release/bundle/osx -ov -format UDZO target/release/Zed.dmg +mkdir -p target/release/dmg +rm -rf target/release/dmg/* +mv "${app_path}" target/release/dmg/ +hdiutil create -volname Zed -srcfolder target/release/dmg -ov -format UDZO target/release/Zed.dmg if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then echo "Notarizing DMG with Apple"