upend/build/get_version.sh
Tomáš Mládek e6862351f9 build: further refactor Earthfile & build process
separate strict/release & nightly builds, avoid LOCAL by default
2024-02-05 22:22:53 +01:00

13 lines
250 B
Bash
Executable file

#!/bin/sh
which git > /dev/null || {
echo "git not found"
exit 1
}
git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
if [ -z "$git_tag" ]; then
echo "dev_$(git rev-parse --short HEAD)"
else
echo "$git_tag" | sed -e 's/^v//g'
fi