upend/build/get_version.sh
Tomáš Mládek 77eccc5bb6
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci, fix: re-add get_version.sh
Obviously, we don't push the .git repo directory inside the build containers, so the build has no way of telling the version.  But it's nice we got it working.
2023-08-23 18:57:11 +02:00

9 lines
189 B
Bash
Executable file

#!/bin/sh
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