Support for extension version increment and decrement

This commit is contained in:
Juan Ignacio Sánchez Lara 2018-02-20 11:13:43 +01:00
parent a50aeed50c
commit d77051cadd

View File

@ -3,7 +3,9 @@
EXTENSION = cdb_geocoder EXTENSION = cdb_geocoder
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
DATA = $(EXTENSION)--$(EXTVERSION).sql NEW_EXTENSION_ARTIFACT = $(EXTENSION)--$(EXTVERSION).sql
DATA = $(NEW_EXTENSION_ARTIFACT) \
$(EXTENSION)--*--*.sql
REGRESS = $(notdir $(basename $(sort $(wildcard test/sql/*test.sql)))) REGRESS = $(notdir $(basename $(sort $(wildcard test/sql/*test.sql))))
TEST_DIR = test/ TEST_DIR = test/
@ -17,7 +19,7 @@ include $(PGXS)
SOURCES_DATA = $(wildcard sql/*.sql) SOURCES_DATA = $(wildcard sql/*.sql)
$(DATA): $(SOURCES_DATA) $(NEW_EXTENSION_ARTIFACT): $(SOURCES_DATA)
rm -f $(EXTENSION)--*.sql rm -f $(EXTENSION)--*.sql
cat $(SOURCES_DATA) >> $@ cat $(SOURCES_DATA) >> $@