pack.sh: refuse to run if there are uncommited assets

This commit is contained in:
yuni 2024-05-07 21:21:43 +02:00
parent c1b071996a
commit ddf197c057

View file

@ -15,6 +15,15 @@
set -e set -e
function check_uncommitted_assets() {
( cd assets; [ $(git status --porcelain . | wc -l) -gt 0 ] )
}
if check_uncommitted_assets; then
echo "Please make sure there are no uncommited files in the 'asset' directory before packing"
exit 1
fi
if [ "$1" == "-b" ]; then if [ "$1" == "-b" ]; then
cargo build --release --target=x86_64-unknown-linux-gnu --no-default-features --features release_linux 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 cargo build --release --target=x86_64-pc-windows-gnu --no-default-features --features release_windows