Add a target that is a real resource to generate-webui

This commit is contained in:
Tom Moulard 2022-03-04 15:28:07 +01:00 committed by GitHub
parent a59dbc4c79
commit b3de9a040b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ build-dev-image-no-cache: dist
## Create the "dist" directory ## Create the "dist" directory
dist: dist:
mkdir dist mkdir -p dist
## Build WebUI Docker image ## Build WebUI Docker image
build-webui-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 echo 'For more information show `webui/readme.md`' > webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md
## Generate WebUI ## Generate WebUI
generate-webui: webui/static/index.html:
if [ ! -f "webui/static/index.html" ]; then \ $(MAKE) build-webui-image
$(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 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
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static; \
fi generate-webui: webui/static/index.html
## Build the binary ## Build the binary
binary: generate-webui build-dev-image binary: generate-webui build-dev-image