When building from tar file, check .gitversion to get the correct version

Distribution builds on Linux tend to be made from tar files, not from git trees.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-04-07 10:48:31 -07:00
parent dc47003e5b
commit 20c1907adb

View file

@ -19,7 +19,7 @@ if [ $# -eq 2 ] && [ "$2" ]; then
v0=$2
else
cmd="git describe --tags --abbrev=12"
v0=$($cmd) || croak "odd; command '$cmd' failed"
v0=$($cmd) || v0=$(cat .gitversion) || croak "odd; command '$cmd' failed"
fi
# strip off the 'v' prefix, if any