From 7d3bb5e21578f5e7599f3600dca9ae0d75ed82ac Mon Sep 17 00:00:00 2001 From: Fred van Dijk Date: Tue, 23 Apr 2024 12:44:09 +0200 Subject: [PATCH] Add support for an instance-local.yaml file in the backend which is git ignored, so you can locally change storage for the backend. --- CHANGELOG.md | 4 ++++ backend/.gitignore | 1 + backend/Makefile | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1afd313..70c9295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2024-04-23 + +- Add support for an instance-local.yaml file in the backend which is git ignored, so you can locally change storage for the backend. [fredvd] + # 2024-03-08 - Switch to plone.distribution. [pbauer] diff --git a/backend/.gitignore b/backend/.gitignore index f8fa97a..dec570b 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -41,3 +41,4 @@ live.cfg inituser pip-wheel-metadata pyvenv.cfg +instance-local.yaml \ No newline at end of file diff --git a/backend/Makefile b/backend/Makefile index 3757124..fa4f080 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -96,7 +96,12 @@ bin/pip: .PHONY: config config: bin/pip ## Create instance configuration @echo "$(GREEN)==> Create instance configuration$(RESET)" - bin/cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance + if [[ -s instance-override.yaml ]]; then \ + echo " Using instance-local.yaml"; \ + bin/cookiecutter -f --no-input --config-file instance-local.yaml gh:plone/cookiecutter-zope-instance ;\ + else \ + bin/cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance ;\ + fi # i18n bin/i18ndude: bin/pip