From 74f6478e4e149fc9da1a92225bed95b9a3b6bdb1 Mon Sep 17 00:00:00 2001 From: lxh2875931338 Date: Wed, 29 Jul 2026 23:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index d796bcb..208556b 100644 --- a/deploy.sh +++ b/deploy.sh @@ -477,7 +477,8 @@ do_deploy() { # ----- 事务前钩子:备份数据库(仅降级时备份) ----- BACKUP_DIR="" - if [ -n "$CURRENT_VERSION" ] && [ "$CURRENT_VERSION" != "0.0.0-dev" ]; then + # 仅当 CURRENT_VERSION 是有效版本格式时才进行版本比对 + if [ -n "$CURRENT_VERSION" ] && [ "$CURRENT_VERSION" != "0.0.0-dev" ] && [ "$CURRENT_VERSION" != "(首次部署)" ]; then compare_version "$CURRENT_VERSION" "$TARGET_VERSION" COMPARE_RESULT=$? if [ $COMPARE_RESULT -eq 2 ]; then