This commit is contained in:
Siyuan Miao 2025-09-25 16:46:32 +00:00 committed by Siyuan
parent d6802c982d
commit d52773d064
1 changed files with 15 additions and 17 deletions

View File

@ -88,12 +88,11 @@ build_dev_test: build_test2json build_gotestsum
tar czfv device-tests.tar.gz -C $(BIN_DIR)/tests . tar czfv device-tests.tar.gz -C $(BIN_DIR)/tests .
frontend: frontend:
@if [ "$(SKIP_UI_BUILD)" = "1" ]; then \ @if [ "$(SKIP_UI_BUILD)" = "1" ] && [ -f "static/index.html" ]; then \
echo "Skipping frontend build..."; \ echo "Skipping frontend build..."; \
else \ else \
cd ui && npm ci && npm run build:device && \ cd ui && npm ci && npm run build:device && \
find ../static/ \ find ../static/ -type f \
-type f \
\( -name '*.js' \ \( -name '*.js' \
-o -name '*.css' \ -o -name '*.css' \
-o -name '*.html' \ -o -name '*.html' \
@ -105,8 +104,7 @@ frontend:
-o -name '*.svg' \ -o -name '*.svg' \
-o -name '*.webp' \ -o -name '*.webp' \
-o -name '*.woff2' \ -o -name '*.woff2' \
\) \ \) -exec sh -c 'gzip -9 -kfv {}' \; ;\
-exec sh -c 'gzip -9 -kfv {}' \; \
fi fi
dev_release: frontend build_dev dev_release: frontend build_dev