Add version handling

This commit is contained in:
2022-08-16 22:27:37 +02:00
parent 9107a2797c
commit 199b48d963
5 changed files with 51 additions and 5 deletions

11
gen_version_header.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
if [[ -z $1 ]]; then
exit -1;
fi
ver=`git describe --tags --always --dirty`
echo "#ifndef _VERSION_GENERATED_H_" > $1
echo "#define _VERSION_GENERATED_H_" >> $1
echo "#define GIT_VERSION_STRING \"$ver\"" >> $1
echo "#endif /* _VERSION_GENERATED_H_ */" >> $1