summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac2
3 files changed, 7 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index dcd88ca..e22154b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ stamp-h1
*.spec
gluster-blockd.service
*.tar.gz
+VERSION
cscope.*
tags
diff --git a/Makefile.am b/Makefile.am
index 8e63b2c..7e5018b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,9 +40,12 @@ gitclean: clean distclean
ltmain.sh missing stamp-h1
rm -rf autom4te.cache ar-lib *.tar.gz m4
-dist-hook: gen-ChangeLog
+dist-hook: gen-ChangeLog gen-VERSION
-.PHONY: gen-ChangeLog
+.PHONY: gen-ChangeLog gen-VERSION
gen-ChangeLog:
(cd $(srcdir) && git diff && echo ===== git log ==== && git log) > $(distdir)/ChangeLog
+
+gen-VERSION:
+ (cd $(srcdir) && git describe --always --tags | cut -f2 -d'v' | cut -f1 -d'-') > $(distdir)/VERSION
diff --git a/configure.ac b/configure.ac
index d1168fa..f19d2aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl cases as published by the Free Software Foundation.
AC_PREREQ([2.69])
AC_INIT([gluster-block],
- m4_esyscmd(echo -n $(git describe --always --tags | cut -f2 -d'v' | cut -f1 -d'-')),
+ m4_esyscmd(echo -n $(cat VERSION 2>/dev/null || git describe --always --tags | cut -f2 -d'v' | cut -f1 -d'-')),
[pkalever@redhat.com],,
[https://github.com/gluster/gluster-block.git])