From 4bacb40fc898ee9519cfe4e9ee50401ec466168c Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Thu, 27 Feb 2014 12:39:43 +0530 Subject: build: set version based on git tag or specific This patch brings version and release number generated at build time using git tags or fixed content from VERSION file. With git tag, version/release number are got from output of 'git describe --tags --match "v[0-9]*"' command. This behavior can be overriden by having VERSION file with fixed version/release. The VERSION file should have text describing version and release for example something like 'v3.4.0-1' For testing this patch, its required to remove autom4te.cache directory to avoid seeing previously set version. BUG: 1074919 Change-Id: I8f68172e8b389b0ba0846e9adb4b597e67a909aa Signed-off-by: Bala.FA Reviewed-on: http://review.gluster.org/7164 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Kaleb KEITHLEY --- Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index fa0f52ea1..030a30cdd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ EXTRA_DIST = autogen.sh \ glusterfs.spec glusterfs-api.pc.in libgfchangelog.pc.in \ error-codes.json gf-error-codes.h.template \ gen-headers.py run-tests.sh \ + build-aux/pkg-version \ $(shell find $(top_srcdir)/tests -type f -print) SUBDIRS = contrib/argp-standalone libglusterfs rpc api xlators glusterfsd \ @@ -28,5 +29,14 @@ gitclean: distclean rm -f $(CONTRIBDIR)/argp-standalone/install-sh rm -f $(CONTRIBDIR)/argp-standalone/missing -dist-hook: +dist-hook: gen-VERSION gen-ChangeLog +.PHONY: gen-VERSION gen-ChangeLog + +gen-ChangeLog: (cd $(srcdir) && git diff && echo ===== git log ==== && git log) > $(distdir)/ChangeLog + +gen-VERSION: + if test -d .git; then \ + $(top_srcdir)/build-aux/pkg-version --full \ + > $(distdir)/VERSION; \ + fi -- cgit