ci: stabilize release workflow setup

This commit is contained in:
lpf
2026-03-12 13:18:57 +08:00
parent 1eca901503
commit 1775b0ec86
2 changed files with 154 additions and 12 deletions

View File

@@ -63,6 +63,7 @@ DEV_WEBUI_DIR?=$(CURDIR)/webui
WEBUI_DIST_DIR=$(DEV_WEBUI_DIR)/dist
WEBUI_PACKAGE_LOCK=$(DEV_WEBUI_DIR)/package-lock.json
NPM?=npm
SKIP_WEBUI_BUILD?=0
# OS detection
UNAME_S:=$(shell uname -s)
@@ -230,6 +231,14 @@ build-webui:
echo "✗ Missing WebUI directory: $(DEV_WEBUI_DIR)"; \
exit 1; \
fi
@if [ "$(SKIP_WEBUI_BUILD)" = "1" ]; then \
if [ -d "$(WEBUI_DIST_DIR)" ]; then \
echo "✓ Reusing existing WebUI dist from $(WEBUI_DIST_DIR)"; \
exit 0; \
fi; \
echo "✗ SKIP_WEBUI_BUILD=1 but WebUI dist is missing: $(WEBUI_DIST_DIR)"; \
exit 1; \
fi
@if ! command -v "$(NPM)" >/dev/null 2>&1; then \
echo "✗ npm is required to build the WebUI"; \
exit 1; \