From 9230ffa925d5b0be10f6dcf5f52ab5546936b02e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 3 Jun 2014 13:20:49 +0200 Subject: [PATCH] Include revision info in cdb_version() output Closes #34 NOTE: it will only work if "make" is run from within a git clone --- Makefile | 4 +++- NEWS | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7664d9d..4ef7f6d 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ UPGRADES = \ sed 's/$$/--$(EXTVERSION).sql/' | \ sed 's/ /--$(EXTVERSION).sql $(EXTENSION)--/g') +REV=$(shell git describe) + DATA_built = \ $(EXTENSION)--$(EXTVERSION).sql \ $(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql \ @@ -63,7 +65,7 @@ $(EXTENSION).control: $(EXTENSION).control.in Makefile sed -e 's/@@VERSION@@/$(EXTVERSION)/' $< > $@ cartodb_version.sql: cartodb_version.sql.in Makefile - sed -e 's/@@VERSION@@/$(EXTVERSION)/' $< > $@ + sed -e 's/@@VERSION@@/$(EXTVERSION) $(REV)/' $< > $@ legacy_regress: $(REGRESS_OLD) Makefile mkdir -p sql/test/ diff --git a/NEWS b/NEWS index e730fa2..5c35f67 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ Bug fixes: - Fully qualify call to CDB_UserDataSize from quota trigger - Fix potential infinite loop in CDB_CartodbfyTable +Enhancements: + + - Include revision info in cdb_version() output (#34) + 0.1.0 - 2014-05-23 ------------------