Use a separate icon for preview releases

This commit is contained in:
Max Brunsfeld 2022-10-26 11:20:16 -07:00
parent a4a8596a29
commit 0f1b0a4a78
6 changed files with 25 additions and 3 deletions

View file

@ -123,8 +123,20 @@ env_logger = "0.9"
serde_json = { version = "1.0", features = ["preserve_order"] }
unindent = "0.1.7"
[package.metadata.bundle]
icon = ["app-icon@2x.png", "app-icon.png"]
[package.metadata.bundle-dev]
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
identifier = "dev.zed.Zed-Dev"
name = "Zed Dev"
osx_minimum_system_version = "10.15.7"
[package.metadata.bundle-preview]
icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"]
identifier = "dev.zed.Zed-Preview"
name = "Zed Preview"
osx_minimum_system_version = "10.15.7"
[package.metadata.bundle-stable]
icon = ["resources/app-icon@2x.png", "resources/app-icon.png"]
identifier = "dev.zed.Zed"
name = "Zed"
osx_minimum_system_version = "10.15.7"

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -22,7 +22,17 @@ echo "Compiling cli binary for x86_64-apple-darwin"
cargo build --release --package cli --target x86_64-apple-darwin
echo "Creating application bundle"
(cd crates/zed && cargo bundle --release --target x86_64-apple-darwin)
(
cd crates/zed
channel=$(cat RELEASE_CHANNEL)
cp Cargo.toml Cargo.toml.backup
sed \
-i .backup \
"s/package.metadata.bundle-${channel}/package.metadata.bundle/" \
Cargo.toml
cargo bundle --release --target x86_64-apple-darwin
mv Cargo.toml.backup Cargo.toml
)
echo "Creating fat binaries"
lipo \