From b64131840e7d0e6b5700522af7cb03cf394236e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 6 Aug 2024 17:19:42 +0200 Subject: [PATCH] Use Docker Compose version 2 --- Makefile | 38 ++++++++++++++++++++++++++++++++++++ custom/custom/alembic/env.py | 1 + 2 files changed, 39 insertions(+) diff --git a/Makefile b/Makefile index 1f587b3bc..cad662dfa 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,46 @@ update-po-from-url: ## Update the po files from the URL provide by PROJECT_PUBLI docker compose run --rm -T tools update-po-only `id --user` `id --group` $(LANGUAGES) .PHONY: update-po +<<<<<<< HEAD update-po: docker compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make -C geoportal update-po" +||||||| parent of 014943c4 (Use Docker Compose version 2) +update-po: ## Update the po files from the running composition + docker compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make --directory=geoportal update-po" + +.PHONY: checks +checks: prospector eslint ## Runs the checks + +.PHONY: prospector +prospector: ## Runs the Prospector checks + docker-compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + prospector --output-format=pylint --die-on-tool-error + +.PHONY: eslint +eslint: ## Runs the eslint checks + docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + eslint $(find geomapfish -type f -name '*.js' -print 2> /dev/null) + docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + eslint $(find geomapfish -type f -name '*.ts' -print 2> /dev/null) +======= +update-po: ## Update the po files from the running composition + docker compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make --directory=geoportal update-po" + +.PHONY: checks +checks: prospector eslint ## Runs the checks + +.PHONY: prospector +prospector: ## Runs the Prospector checks + docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + prospector --output-format=pylint --die-on-tool-error + +.PHONY: eslint +eslint: ## Runs the eslint checks + docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + eslint $(find geomapfish -type f -name '*.js' -print 2> /dev/null) + docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \ + eslint $(find geomapfish -type f -name '*.ts' -print 2> /dev/null) +>>>>>>> 014943c4 (Use Docker Compose version 2) .PHONY: build build: diff --git a/custom/custom/alembic/env.py b/custom/custom/alembic/env.py index 9340b4f0f..75f18d185 100644 --- a/custom/custom/alembic/env.py +++ b/custom/custom/alembic/env.py @@ -1,4 +1,5 @@ """Pyramid bootstrap environment. """ + from alembic import context from custom.models.meta import Base from pyramid.paster import get_appsettings, setup_logging