add build script to pack.sh

This commit is contained in:
yuni 2024-04-02 17:39:57 +02:00
parent e00d891150
commit ba4c03b7fb

View file

@ -4,6 +4,11 @@
set -e set -e
if [ "$1" == "-b" ]; then
cargo build --release
cargo build --target=x86_64-pc-windows-gnu --release
fi
VERSION="$(sed -nr 's/^\s*version\s*=\s*"(.*)"\s*$/\1/p' Cargo.toml)" VERSION="$(sed -nr 's/^\s*version\s*=\s*"(.*)"\s*$/\1/p' Cargo.toml)"
test -z "$VERSION" && echo 'Error: Could not extract version from Cargo.toml' && exit test -z "$VERSION" && echo 'Error: Could not extract version from Cargo.toml' && exit
echo "Extracted version from Cargo.toml: $VERSION" echo "Extracted version from Cargo.toml: $VERSION"