ci(deploy): [0] 脏检查忽略未跟踪文件(git pull 不丢未跟踪;防并发临时脚本误阻部署)(cma-deploy-untracked-fix-20260916)
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/push/main Pipeline was successful
This commit is contained in:
@@ -10,7 +10,7 @@ echo ""
|
||||
# 0. 提交纪律检查:本地有未提交修改则中止,防止 git pull 覆盖丢失
|
||||
echo "[0/5] 提交纪律检查..."
|
||||
cd "$SCRIPT_DIR"
|
||||
DIRTY=$(git status --porcelain 2>/dev/null | grep -v "__pycache__" | head -20)
|
||||
DIRTY=$(git status --porcelain 2>/dev/null | grep -vE "__pycache__|^\?\?" | head -20)
|
||||
if [ -n "$DIRTY" ]; then
|
||||
echo "❌ 检测到本地未提交的修改,中止部署(防止 git pull 覆盖丢失代码):"
|
||||
echo "$DIRTY"
|
||||
|
||||
Reference in New Issue
Block a user