Commit 8638d78c authored by Ralph Giles's avatar Ralph Giles

Pass --always to 'git describe'.

This provides a fallback commit id if no tags are available,
for example when doing a shallow clone.
parent 779ea4da
...@@ -34,7 +34,8 @@ fi ...@@ -34,7 +34,8 @@ fi
# -dirty from files that have been touched but are not actually altered in the # -dirty from files that have been touched but are not actually altered in the
# working dir. # working dir.
GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \ GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \
&& git describe --tags --match 'v*' --dirty 2> /dev/null) && git describe --tags --match 'v*' \
--always --dirty 2> /dev/null)
GIT_VERSION=${GIT_VERSION#v} GIT_VERSION=${GIT_VERSION#v}
if [ -n "$GIT_VERSION" ]; then if [ -n "$GIT_VERSION" ]; then
......
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