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.
|
||||
# The Python package is installed in a virtual environment envs/X.Y.Z/
|
||||
# Requires sudo.
|
||||
# Use the RELEASE_VERSION environment variable to deploy a specific version:
|
||||
# sudo make deploy RELEASE_VERSION=1.0.0
|
||||
deploy:
|
||||
$(MAKE) -C $(EXT_DIR) deploy
|
||||
|
@ -61,15 +61,17 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA)
|
||||
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
|
||||
|
||||
RELEASE_VERSION ?= $(EXTVERSION)
|
||||
|
||||
# Install the current relese into the PostgreSQL extensions directory
|
||||
# and the Python package in a virtual environment envs/X.Y.Z
|
||||
deploy:
|
||||
$(INSTALL_DATA) ../../release/$(EXTENSION).control '$(DESTDIR)$(datadir)/extension/'
|
||||
$(INSTALL_DATA) ../../release/*.sql '$(DESTDIR)$(datadir)/extension/'
|
||||
# TODO: install also upgrade/downgrade files (manually generated)
|
||||
virtualenv --system-site-packages $(VIRTUALENV_PATH)/$(EXTVERSION)
|
||||
$(VIRTUALENV_PATH)/$(EXTVERSION)/bin/pip install -I -U ../../release/python/$(EXTVERSION)/$(PACKAGE)
|
||||
$(VIRTUALENV_PATH)/$(EXTVERSION)/bin/pip install -I nose
|
||||
virtualenv --system-site-packages $(VIRTUALENV_PATH)/$(RELEASE_VERSION)
|
||||
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I -U ../../release/python/$(RELEASE_VERSION)/$(PACKAGE)
|
||||
$(VIRTUALENV_PATH)/$(RELEASE_VERSION)/bin/pip install -I nose
|
||||
|
||||
clean-dev:
|
||||
rm -f $(EXTENSION)--*.sql
|
||||
|
Loading…
Reference in New Issue
Block a user