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 <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN 2014-06-27 23:36:11 +02:00
parent a11b51c254
commit 11a7a4cdcd

View File

@ -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