Commit c349b260 authored by Raymond Toy's avatar Raymond Toy
Browse files

Support older versions of git that don't support describe --dirty.

Just use plain describe, which is close enough.
parent 31b1a5a1
......@@ -11,8 +11,10 @@ usage()
SKIP_PCL=
NO_PCL_FEATURE=
# Default version is the date with the git hash.
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`"
# Default version is the date with the git hash. Older versions of
# git don't support --dirty, but the output in that case is what we
# want (except for ending with "dirty"), so we're set.
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null || git describe 2>/dev/null)`"
# If the git hash looks like a snapshot tag or release, don't add the date.
VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment