diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2014-06-27 23:36:11 +0200 |
---|---|---|
committer | Yann E. MORIN <yann.morin.1998@free.fr> | 2014-06-27 23:36:11 +0200 |
commit | 11a7a4cdcd430ea565b6dbfe42a6c7e76c17158c (patch) | |
tree | 087a9df298e35c302a9611f5a82f1968deab18f4 /configure.ac | |
parent | a11b51c254dc336f92a564f253f7be310d6d68ef (diff) | |
download | crosstool-ng-11a7a4cdcd430ea565b6dbfe42a6c7e76c17158c.tar.gz crosstool-ng-11a7a4cdcd430ea565b6dbfe42a6c7e76c17158c.tar.bz2 crosstool-ng-11a7a4cdcd430ea565b6dbfe42a6c7e76c17158c.zip |
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index fd69af21..f8c67be6 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 |