From 43aa7ac977c9638b6a784ae410ac4cf58845a8b1 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Wed, 17 Feb 2016 11:44:37 +0100 Subject: [PATCH] Move extension artifacts to base diretcory The .control file is taken from there anyway by the PGXS install script, and it is the convention used in other projects --- CONTRIBUTING.md | 6 +++--- pg/Makefile | 12 ++---------- pg/dist/.gitignore | 0 pg/dist/crankshaft--0.0.1.sql | 5 ----- 4 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 pg/dist/.gitignore delete mode 100644 pg/dist/crankshaft--0.0.1.sql diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7bada4..633199b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,11 +38,11 @@ follow the[Semantic Versioning 2.0](http://semver.org/) guidelines: * Update the control file and the Makefile to generate the complete SQL file for the new created version. After running `make` a new - file `dist/crankshaft--X.Y.Z.sql` will be created for the current version. + file `crankshaft--X.Y.Z.sql` will be created for the current version. Additional files for migrating to/from the previous version A.B.Z should be created: - - `dist/crankshaft--X.Y.Z--A.B.C.sql` - - `dist/crankshaft--A.B.C--X.Y.Z.sql` + - `crankshaft--X.Y.Z--A.B.C.sql` + - `crankshaft--A.B.C--X.Y.Z.sql` All these new files must be added to git and pushed. * Update the public docs! ;-) diff --git a/pg/Makefile b/pg/Makefile index 858da71..34de170 100644 --- a/pg/Makefile +++ b/pg/Makefile @@ -5,7 +5,7 @@ EXTENSION = crankshaft EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") # The new version to be generated from templates -NEW_EXTENSION_ARTIFACT = dist/$(EXTENSION)--$(EXTVERSION).sql +NEW_EXTENSION_ARTIFACT = $(EXTENSION)--$(EXTVERSION).sql # DATA is a special variable used by postgres build infrastructure # These are the files to be installed in the server shared dir, @@ -16,19 +16,11 @@ DATA = $(NEW_EXTENSION_ARTIFACT) SOURCES_DATA_DIR = sql/$(EXTVERSION) SOURCES_DATA = $(wildcard sql/$(EXTVERSION)/*.sql) -# The extension installation artifacts are stored in the dist subdirectory +# The extension installation artifacts are stored in the base subdirectory $(NEW_EXTENSION_ARTIFACT): $(SOURCES_DATA) rm -f $@ cat $(SOURCES_DATA_DIR)/*.sql >> $@ -# The PGXS build infraestructure takes the control file from this -# directory, but for consistency we will copy the control file to -# the dist subdirectory too. -dist/$(EXTENSION).control: $(EXTENSION).control - cp $< $@ - -all: dist/$(EXTENSION).control - REGRESS = $(notdir $(basename $(wildcard test/$(EXTVERSION)/sql/*test.sql))) TEST_DIR = test/$(EXTVERSION) REGRESS_OPTS = --inputdir='$(TEST_DIR)' --outputdir='$(TEST_DIR)' diff --git a/pg/dist/.gitignore b/pg/dist/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/pg/dist/crankshaft--0.0.1.sql b/pg/dist/crankshaft--0.0.1.sql deleted file mode 100644 index e342f68..0000000 --- a/pg/dist/crankshaft--0.0.1.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE OR REPLACE FUNCTION cdb_poc_xyz() -RETURNS Text AS $$ - from crankshaft.poc import xyz - return xyz() -$$ LANGUAGE plpythonu;