build(Makefile): explicitely execute hpack on missing uniworx.cabal for robustness

This commit is contained in:
Sarah Vaupel 2024-11-13 03:48:57 +01:00
parent cbf167d197
commit 9f862bcfd6
2 changed files with 4 additions and 3 deletions

View File

@ -278,7 +278,7 @@ endif
--compile-backend:
stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin
# HELP(dependencies-backend): (re-)build backend dependencies
--dependencies-backend: stack.yaml stack.yaml.lock package.yaml
--dependencies-backend: uniworx.cabal
stack build $(STACK_CORES) --fast --only-dependencies
# HELP(lint-backend): lint backend
--lint-backend:
@ -286,6 +286,8 @@ endif
# HELP(test-backend): test backend
--test-backend:
stack build $(STACK_CORES) --test --coverage --fast --flag uniworx:library-only $(--DEVELOPMENT)
uniworx.cabal:
stack exec -- hpack --force
# HELP(compile-frontend): compile frontend assets
--compile-frontend: node_modules assets esbuild.config.mjs
@ -399,7 +401,5 @@ switch-develop:
develop/.current:
ls -1 develop | tail -n1 > develop/.current
stack.yaml.lock: --dependencies-backend;
.PHONY: --%
.SUFFIXES: # Delete all default suffixes

View File

@ -23,6 +23,7 @@ ENV HOME=${PROJECT_DIR}
RUN make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB}
RUN stack install yesod-bin
RUN stack install hpack
ENV FRADRIVE_MAKE_TARGET=--start-backend
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}"