From 9f862bcfd63c56df75e093cf81fdf1a1b0816a14 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 13 Nov 2024 03:48:57 +0100 Subject: [PATCH] build(Makefile): explicitely execute hpack on missing uniworx.cabal for robustness --- Makefile | 6 +++--- docker/backend/Dockerfile | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5e00fe41a..33e2e5e97 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 21081debd..54a0c5d55 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -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}"