From 59729f01b2b6e20d4a17d35c08eb2be786851b16 Mon Sep 17 00:00:00 2001 From: fanlv Date: Wed, 23 Jul 2025 14:42:12 +0800 Subject: [PATCH] chore(makefile): optimize build script auto-compile when static files are missing --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 316d1c2c..de92b4db 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ COMPOSE_FILE := docker/docker-compose.yml MYSQL_SCHEMA := ./docker/volumes/mysql/schema.sql MYSQL_INIT_SQL := ./docker/volumes/mysql/sql_init.sql ENV_FILE := ./docker/.env +STATIC_DIR := ./bin/resources/static debug: middleware python server @@ -20,6 +21,10 @@ fe: @bash $(BUILD_FE_SCRIPT) server: + @if [ ! -d "$(STATIC_DIR)" ]; then \ + echo "Static directory '$(STATIC_DIR)' not found, building frontend..."; \ + $(MAKE) fe; \ + fi @echo "Building and run server..." @bash $(BUILD_SERVER_SCRIPT) -start