fix version extraction

This commit is contained in:
yuni 2024-05-14 18:25:07 +02:00
parent 59fefad6d3
commit 5a3f3bd96f

View file

@ -29,7 +29,7 @@ if [ "$1" == "-b" ]; then
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
fi 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 | head -n1)"
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"