add release_windows/release_linux features to streamline building

This commit is contained in:
yuni 2024-04-27 00:32:38 +02:00
parent bdf49e2985
commit 77bc8ee8e1
2 changed files with 4 additions and 2 deletions

View file

@ -37,6 +37,8 @@ default = ["x11", "embed_assets"]
mute_music = []
dev_mode = []
dev = ["dev_mode", "mute_music", "bevy/dynamic_linking", "bevy/file_watcher"]
release_linux = ["x11", "wayland", "embed_assets"]
release_windows = ["embed_assets"]
wasm = ["bevy/webgl2"]
x11 = ["bevy/x11"]
wayland = ["bevy/wayland"]

View file

@ -16,8 +16,8 @@
set -e
if [ "$1" == "-b" ]; then
cargo build --release --target=x86_64-unknown-linux-gnu --no-default-features --features "x11 wayland embed_assets"
cargo build --release --target=x86_64-pc-windows-gnu --no-default-features --features "embed_assets"
cargo build --release --target=x86_64-unknown-linux-gnu --no-default-features --features release_linux
cargo build --release --target=x86_64-pc-windows-gnu --no-default-features --features release_windows
fi
VERSION="$(sed -nr 's/^\s*version\s*=\s*"(.*)"\s*$/\1/p' Cargo.toml)"