generate-version.sh 229 Bytes
Newer Older
1 2 3 4
#!/bin/sh

set -e

5
if [ -d .git ] && [ "$(git tag)" ] ; then
6
    version="$(git describe --dirty)"
7 8 9
elif [ -f version ] ; then
    version="$(cat version)"
else
10
    version="unknown"
11 12 13
fi

echo "#define BABELD_VERSION \"$version\""