build(Makefile): revise database-fill/clear/migrate/... target logic

This commit is contained in:
Sarah Vaupel 2024-09-23 00:17:40 +02:00
parent 599649fb25
commit ecb085ad10

View File

@ -176,23 +176,19 @@ serve-backend:
--test-backend:
stack build --test --coverage --fast --flag uniworx:library-only $(stackopts)
# TODO: maybe deprecated
.PHONY: database
database: .stack compile-backend-prod
export SERVER_SESSION_ACID_FALLBACK=$${SERVER_SESSION_ACID_FALLBACK:-true}
export AVSPASS=$${AVSPASS:-nopasswordset}
stack exec uniworxdb -- $(db)
.PHONY: serve-database
serve-database: CONTAINER_INTERACTIVE=-it
serve-database: --containerized-database
.PHONY: database-%
database-%:
@echo "This target, intended to fill, clear, migrate, ... the database using uniworxdb from inside the backend container is yet to be implemented"
exit 1
.PHONY: %-database
%-database:
$(MAKE) -- --containerized---$*-database-backend
.PHONY: --%-database
--%-database: .stack
SERVER_SESSION_ACID_FALLBACK=${SERVER_SESSION_ACID_FALLBACK:-true} ; \
AVSPASS=${AVSPASS:-nopasswordset} ; \
stack exec uniworxdb -- $*
# .PHONY: .stack
.stack: stack.yaml stack.yaml.lock
.stack:
$(MAKE) -- --image-run---.stack