pack.sh: extract version from Cargo.toml

This commit is contained in:
yuni 2024-03-31 20:06:51 +02:00
parent eaeb5d862e
commit 1eaa2d7fb9

View file

@ -4,7 +4,10 @@
set -e
VERSION=0.4.0
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
echo "Extracted version from Cargo.toml: $VERSION"
TMPPATH=ZIP_TMP_PATH
mkdir "$TMPPATH"
cd "$TMPPATH"