* [PATCH] Fallback to the git SHA1 if there are no tags
@ 2013-07-09 8:44 Michael Ellerman
0 siblings, 0 replies; only message in thread
From: Michael Ellerman @ 2013-07-09 8:44 UTC (permalink / raw)
To: trinity
We use 'git describe' to generate the GITVERSION. However if the
repository has no tags for some reason that fails, and generates no
output. We should use 'git describe --always' which will fall back to
just printing the abbreviated SHA1 if there are no tags available.
---
configure.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.sh b/configure.sh
index 804860b..90694d7 100755
--- a/configure.sh
+++ b/configure.sh
@@ -201,7 +201,7 @@ rm -f "$TMP" "$TMP.log" "$TMP.c"
#############################################################################################
if [ "$DEVEL" == "1" ]; then
- VER=$(git describe)
+ VER=$(git describe --always)
echo "#define GITVERSION \""$VER\" >> config.h
fi
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-09 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 8:44 [PATCH] Fallback to the git SHA1 if there are no tags Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.