From 7a7688bbe0e9eda6d976200c0c41e846cf8a26be Mon Sep 17 00:00:00 2001 From: lxh2875931338 Date: Wed, 29 Jul 2026 23:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=83=A8=E7=BD=B2=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 208556b..cbf1f6b 100644 --- a/deploy.sh +++ b/deploy.sh @@ -477,7 +477,8 @@ do_deploy() { # ----- 事务前钩子:备份数据库(仅降级时备份) ----- BACKUP_DIR="" - # 仅当 CURRENT_VERSION 是有效版本格式时才进行版本比对 + + # 如果是首次部署,跳过版本比对(因为版本文件不存在) if [ -n "$CURRENT_VERSION" ] && [ "$CURRENT_VERSION" != "0.0.0-dev" ] && [ "$CURRENT_VERSION" != "(首次部署)" ]; then compare_version "$CURRENT_VERSION" "$TARGET_VERSION" COMPARE_RESULT=$? @@ -509,6 +510,8 @@ do_deploy() { print_warn "部署目录不存在,跳过备份" fi fi + else + print_info "首次部署,跳过版本比对" fi # ----- 安装必要工具(必须在拉取代码之前!)-----