krata/hack/dist/version.sh

16 lines
371 B
Bash
Raw Normal View History

2024-03-07 09:04:05 +00:00
#!/bin/sh
set -e
2024-03-07 16:40:06 +00:00
# shellcheck source-path=SCRIPTDIR source=common.sh
2024-03-07 09:04:05 +00:00
. "$(dirname "${0}")/common.sh"
cd "${KRATA_DIR}"
KRATA_VERSION="$(grep -A1 -F '[workspace.package]' Cargo.toml | grep 'version' | awk '{print $3}' | sed 's/"//g')"
if [ -z "${KRATA_VERSION}" ]
then
echo "ERROR: failed to determine krata version" > /dev/stderr
exit 1
fi
echo "${KRATA_VERSION}"