mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-03 08:18:58 +08:00
ci: stabilize release workflow setup
This commit is contained in:
9
Makefile
9
Makefile
@@ -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; \
|
||||
|
||||
Reference in New Issue
Block a user