From 6f0e3959c38ae1b09846bd6b5954a89e0556b914 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 22 Apr 2015 13:59:47 +0200 Subject: get version from git Signed-off-by: Christian Hesse --- config.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.mk b/config.mk index 79da1b6..5d92114 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,12 @@ # vis version -VERSION = devel +# we have no tags in git, so just use revision count an hash for now +GITREVCOUNT = "$(shell git rev-list --count master 2>/dev/null)" +GITHASH = "$(shell git log -1 --format="%h" 2>/dev/null)" +ifeq (${GITREVCOUNT},) + VERSION = devel +else + VERSION = "0.r${GITREVCOUNT}.g${GITHASH}" +endif # Customize below to fit your system -- cgit v1.2.3