fix(deploy): update.sh改用reset --hard同步远端,本地误改不再阻塞自动部署
This commit is contained in:
+3
-1
@@ -66,7 +66,9 @@ if [ "$LOCAL" = "$REMOTE" ]; then
|
||||
fi
|
||||
|
||||
echo "[$(date '+%F %T')] 检测到新版本: ${LOCAL:0:8} -> ${REMOTE:0:8}"
|
||||
git pull --ff-only -q origin "$BRANCH"
|
||||
# 部署节点始终与远端完全一致:reset --hard 丢弃任何本地变更(含文件 mode 变化),
|
||||
# 避免 cc1 上误改文件导致 pull 拒绝合并、更新链路卡死
|
||||
git reset --hard -q "origin/$BRANCH"
|
||||
|
||||
# 依赖如有变更自动安装(无变化时 pip 会快速跳过)
|
||||
if [ -x ".venv/bin/pip" ]; then
|
||||
|
||||
Reference in New Issue
Block a user