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,25 +88,23 @@ build_dev_test: build_test2json build_gotestsum
tar czfv device-tests.tar.gz -C $(BIN_DIR)/tests .
frontend:
@if [ "$(SKIP_UI_BUILD)" = "1" ]; then \
@if [ "$(SKIP_UI_BUILD)" = "1" ] && [ -f "static/index.html" ]; then \
echo "Skipping frontend build..."; \
else \
cd ui && npm ci && npm run build:device && \
find ../static/ \
-type f \
\( -name '*.js' \
-o -name '*.css' \
-o -name '*.html' \
-o -name '*.ico' \
-o -name '*.png' \
-o -name '*.jpg' \
-o -name '*.jpeg' \
-o -name '*.gif' \
-o -name '*.svg' \
-o -name '*.webp' \
-o -name '*.woff2' \
\) \
-exec sh -c 'gzip -9 -kfv {}' \; \
cd ui && npm ci && npm run build:device && \
find ../static/ -type f \
\( -name '*.js' \
-o -name '*.css' \
-o -name '*.html' \
-o -name '*.ico' \
-o -name '*.png' \
-o -name '*.jpg' \
-o -name '*.jpeg' \
-o -name '*.gif' \
-o -name '*.svg' \
-o -name '*.webp' \
-o -name '*.woff2' \
\) -exec sh -c 'gzip -9 -kfv {}' \; ;\
fi
dev_release: frontend build_dev