Add RELEASE_VERSION option to make deploy
Now make deploy installs by default the current version, but can be made to install any prior specific version using a environmnt varialbe RELEASE_VERSION
This commit is contained in:
parent
a518034e65
commit
d13f167d47
2
Makefile
2
Makefile
@ -29,5 +29,7 @@ release:
|
|||||||
# Install the current release.
|
# Install the current release.
|
||||||
# The Python package is installed in a virtual environment envs/X.Y.Z/
|
# The Python package is installed in a virtual environment envs/X.Y.Z/
|
||||||
# Requires sudo.
|
# Requires sudo.
|
||||||
|
# Use the RELEASE_VERSION environment variable to deploy a specific version:
|
||||||
|
# sudo make deploy RELEASE_VERSION=1.0.0
|
||||||
deploy:
|
deploy:
|
||||||
$(MAKE) -C $(EXT_DIR) deploy
|
$(MAKE) -C $(EXT_DIR) deploy
|
||||||
|
@ -61,15 +61,17 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
|||||||
cp -r ../py/$(PACKAGE) ../../release/python/$(EXTVERSION)/
|
cp -r ../py/$(PACKAGE) ../../release/python/$(EXTVERSION)/
|
||||||
$(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py
|
$(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py
|
||||||
|
|
||||||
|
RELEASE_VERSION ?= $(EXTVERSION)
|
||||||
|
|
||||||
# Install the current relese into the PostgreSQL extensions directory
|
# Install the current relese into the PostgreSQL extensions directory
|
||||||
# and the Python package in a virtual environment envs/X.Y.Z
|
# and the Python package in a virtual environment envs/X.Y.Z
|
||||||
deploy:
|
deploy:
|
||||||
$(INSTALL_DATA) ../../release/$(EXTENSION).control '$(DESTDIR)$(datadir)/extension/'
|
$(INSTALL_DATA) ../../release/$(EXTENSION).control '$(DESTDIR)$(datadir)/extension/'
|
||||||
$(INSTALL_DATA) ../../release/*.sql '$(DESTDIR)$(datadir)/extension/'
|
$(INSTALL_DATA) ../../release/*.sql '$(DESTDIR)$(datadir)/extension/'
|
||||||
# TODO: install also upgrade/downgrade files (manually generated)
|
# TODO: install also upgrade/downgrade files (manually generated)
|
||||||
virtualenv --system-site-packages $(VIRTUALENV_PATH)/$(EXTVERSION)
|
virtualenv --system-site-packages $(VIRTUALENV_PATH)/$(RELEASE_VERSION)
|
||||||
$(VIRTUALENV_PATH)/$(EXTVERSION)/bin/pip install -I -U ../../release/python/$(EXTVERSION)/$(PACKAGE)
|
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I -U ../../release/python/$(RELEASE_VERSION)/$(PACKAGE)
|
||||||
$(VIRTUALENV_PATH)/$(EXTVERSION)/bin/pip install -I nose
|
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I nose
|
||||||
|
|
||||||
clean-dev:
|
clean-dev:
|
||||||
rm -f $(EXTENSION)--*.sql
|
rm -f $(EXTENSION)--*.sql
|
||||||
|
Loading…
Reference in New Issue
Block a user