aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-04-22 13:59:47 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-04-22 20:25:55 +0200
commit6f0e3959c38ae1b09846bd6b5954a89e0556b914 (patch)
treed5d43ae6fd9c8d963502e1930153ac9d1a132dd8
parent625244ab41640ec43d2621465ace81b4c242385b (diff)
downloadvis-6f0e3959c38ae1b09846bd6b5954a89e0556b914.tar.gz
vis-6f0e3959c38ae1b09846bd6b5954a89e0556b914.tar.xz
get version from git
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--config.mk9
1 files changed, 8 insertions, 1 deletions
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