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
This commit is contained in:
Javier Goizueta 2016-02-17 11:44:37 +01:00
parent fb1cd2da0e
commit 43aa7ac977
4 changed files with 5 additions and 18 deletions

View File

@ -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 * Update the control file and the Makefile to generate the complete SQL
file for the new created version. After running `make` a new 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 Additional files for migrating to/from the previous version A.B.Z should be
created: created:
- `dist/crankshaft--X.Y.Z--A.B.C.sql` - `crankshaft--X.Y.Z--A.B.C.sql`
- `dist/crankshaft--A.B.C--X.Y.Z.sql` - `crankshaft--A.B.C--X.Y.Z.sql`
All these new files must be added to git and pushed. All these new files must be added to git and pushed.
* Update the public docs! ;-) * Update the public docs! ;-)

View File

@ -5,7 +5,7 @@ EXTENSION = crankshaft
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/")
# The new version to be generated from templates # 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 # DATA is a special variable used by postgres build infrastructure
# These are the files to be installed in the server shared dir, # 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_DIR = sql/$(EXTVERSION)
SOURCES_DATA = $(wildcard sql/$(EXTVERSION)/*.sql) 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) $(NEW_EXTENSION_ARTIFACT): $(SOURCES_DATA)
rm -f $@ rm -f $@
cat $(SOURCES_DATA_DIR)/*.sql >> $@ 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))) REGRESS = $(notdir $(basename $(wildcard test/$(EXTVERSION)/sql/*test.sql)))
TEST_DIR = test/$(EXTVERSION) TEST_DIR = test/$(EXTVERSION)
REGRESS_OPTS = --inputdir='$(TEST_DIR)' --outputdir='$(TEST_DIR)' REGRESS_OPTS = --inputdir='$(TEST_DIR)' --outputdir='$(TEST_DIR)'

0
pg/dist/.gitignore vendored
View File

View File

@ -1,5 +0,0 @@
CREATE OR REPLACE FUNCTION cdb_poc_xyz()
RETURNS Text AS $$
from crankshaft.poc import xyz
return xyz()
$$ LANGUAGE plpythonu;