Allow build without git

This commit is contained in:
2025-07-31 20:28:18 +02:00
parent 29fdc841b7
commit 3ff626134e
2 changed files with 23 additions and 5 deletions

View File

@@ -4,7 +4,12 @@ if [[ -z $1 ]]; then
exit -1;
fi
ver=`git describe --tags --always --dirty`
if [[ "$2" == "dummy" ]]; then
ver="v0.0.0-undefined"
else
ver=`git describe --tags --always --dirty`
fi
echo "#ifndef _VERSION_GENERATED_H_" > $1
echo "#define _VERSION_GENERATED_H_" >> $1
echo "#define GIT_VERSION_STRING \"$ver\"" >> $1