From 11a7a4cdcd430ea565b6dbfe42a6c7e76c17158c Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 27 Jun 2014 23:36:11 +0200 Subject: configure: use a saner version string for git snapshots This avoids using an oldish tag as base for the version string. Reported-by: Bryan Hundven Signed-off-by: "Yann E. MORIN" diff --git a/configure.ac b/configure.ac index fd69af2..f8c67be 100644 --- a/configure.ac +++ b/configure.ac @@ -360,7 +360,8 @@ AS_IF( [AS_CASE( [${PACKAGE_VERSION}], [git|*+git], - [rev_id="$( git describe --tags 2>/dev/null )" + [rev_id="$( git rev-parse --short HEAD )" + git diff-index --quiet HEAD || rev_id="${rev_id}-dirty" PACKAGE_VERSION="${PACKAGE_VERSION}+${rev_id:-unknown-$( date +%Y%m%d.%H%M%S )}" ])]) # Arrange to have no / in the directory name, no need to create an -- cgit v0.10.2-6-g49f6