From 790720446a56e010ea518101ea2991f2cede0d41 Mon Sep 17 00:00:00 2001 From: shi Date: Sat, 1 Mar 2025 14:26:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor(sh):=20=E7=A7=BB=E9=99=A4=20nginx.sh?= =?UTF-8?q?=20=E4=B8=AD=E7=9A=84=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除了检查 $packUrl/dist目录是否存在的逻辑 -移除了多余的空行,优化了代码结构 --- sh/linux/nginx.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sh/linux/nginx.sh b/sh/linux/nginx.sh index 8942938..e221f8e 100644 --- a/sh/linux/nginx.sh +++ b/sh/linux/nginx.sh @@ -18,8 +18,7 @@ packUrl=$3 cd "$packUrl" || { echo "Error: Failed to change directory to $packUrl"; exit 1; } -# 检查 $packUrl/dist 路径是否存在存在就不需要打包 -if [ ! -d "$packUrl/dist" ]; then + # 执行构建命令 @@ -27,7 +26,7 @@ npm install npm run build -- --tenant="$tenantName" -fi + # 删除目标目录下的所有文件和子目录