From b3de9a040b13cc4826926c2655a56ca25cc7f692 Mon Sep 17 00:00:00 2001 From: Tom Moulard Date: Fri, 4 Mar 2022 15:28:07 +0100 Subject: [PATCH] Add a target that is a real resource to generate-webui --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 356eff64c..da11074fe 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ build-dev-image-no-cache: dist ## Create the "dist" directory dist: - mkdir dist + mkdir -p dist ## Build WebUI Docker image build-webui-image: @@ -63,12 +63,12 @@ clean-webui: echo 'For more information show `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md ## Generate WebUI -generate-webui: - if [ ! -f "webui/static/index.html" ]; then \ - $(MAKE) build-webui-image; \ - docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui npm run build:nc; \ - docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static; \ - fi +webui/static/index.html: + $(MAKE) build-webui-image + docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui npm run build:nc + docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static + +generate-webui: webui/static/index.html ## Build the binary binary: generate-webui build-dev-image