aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile.local
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2014-04-22 18:19:44 +0300
committerGravatar David Bremner <david@tethera.net>2014-04-24 14:01:05 +0900
commitbc64cdce289d84be2550c4fccb1f008d15eaeb0e (patch)
treebdd38febf26f17bb21bb88a2d35fd9d86db90757 /Makefile.local
parent40dc79d6ac828bc24ae1ec797aa50e53fc455621 (diff)
building from git: use --abbrev=7 for version string
Users may have set core.abbrev=n, where n != 7 in their git config file(s) which would give them different than expected version strings when building notmuch from git. This fixes the commit hash part of version string to 7 hexadecimal values.
Diffstat (limited to 'Makefile.local')
-rw-r--r--Makefile.local2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.local b/Makefile.local
index 877a9790..6e78368c 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -21,7 +21,7 @@ endif
VERSION:=$(shell cat ${srcdir}/version)
ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
ifeq ($(IS_GIT),yes)
-VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
+VERSION:=$(shell git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
# Write the file 'version.stamp' in case its contents differ from $(VERSION)
FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
ifneq ($(FILE_VERSION),$(VERSION))