build: use git rev-parse for GITVERSION
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 8 Mar 2018 12:33:56 +0000 (13:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 8 Mar 2018 12:51:25 +0000 (13:51 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Makefile

index 9470276..dd551f3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ MAN1DIR=${MANDIR}/man1/
 PERLDIR=${PREFIX}/share/perl5
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-GITVERSION:=$(shell cat .git/refs/heads/master)
+GITVERSION:=$(shell git rev-parse HEAD)
 
 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb