From 3f7bc23c6cd92c1f71d814c1ecc9d52db6bba3e6 Mon Sep 17 00:00:00 2001 From: Falco Date: Thu, 12 Jan 2017 21:43:58 +0100 Subject: [PATCH] use git for configure revision --- configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 6ccc15ab4..e5ed84339 100644 --- a/configure.ac +++ b/configure.ac @@ -557,10 +557,10 @@ AC_SUBST(PYTHON_INSTALL_PARAMS) AC_SUBST(COMPILETIME_OPTIONS) -# Try to guess real svn revision if any, fallback to hardcoded otherwise -SVN_REVISION=`svn info 2>/dev/null | sed -n -e '/^URL\:.*libtorrent.svn.sourceforge.net/,$!d;s,^Revision\: \([[0-9]]*\)$,\1,p'` -AS_IF([test -z "$SVN_REVISION"], - [SVN_REVISION=`sed -n -e 's/^#define LIBTORRENT_REVISION \"\$Rev\: \([0-9]*\) \$\" $/\1/p' include/libtorrent/version.hpp`]) +# Try to guess real git revision if any, fallback to hardcoded otherwise +GIT_REVISION=`git log -1 --format=format:%h 2>/dev/null` +AS_IF([test -z "$GIT_REVISION"], + [GIT_REVISION=`sed -n -e "s/^#define LIBTORRENT_REVISION \"\([0-9a-z]*\)\"$/\1/p" $(dirname $0)/include/libtorrent/version.hpp`]) ############################################################################### @@ -603,7 +603,7 @@ cat > config.report << END Package: name: ${PACKAGE_NAME} version: ${PACKAGE_VERSION} - svn revision: ${SVN_REVISION} + git revision: ${GIT_REVISION} Build environment: build system: ${build}