fix(闸收敛批三): .gates/.gitignore 入库 + 脚本自愈重建
合回 master 时发现:.gates/.gitignore 未入库,receipt.json 被纳入版本管理—— 它是每跑批覆写的当次回执,属中间产物。 成因:重跑闸前用 rm -rf game/tests/.gates 清目录,把 .gitignore 一起带走了; 脚本自身不重建,跑得再多次也不会回来。 - .gates/.gitignore 入库(挡 receipt.json 与 *.log)。 - run_all_gates.sh 启动时自愈:.gitignore 缺失则重建,杜绝复发。
This commit is contained in:
1 parent
94f1bba840
commit
eb5e892456
3 files changed
+13
-63
No files matched your search
@@ -28,6 +28,15 @@ QUICK=0
|
||||
[ "${1:-}" = "--quick" ] && QUICK=1
|
||||
[ $# -gt 1 ] && { echo "用法: tools/run_all_gates.sh [--quick]"; exit 2; }
|
||||
|
||||
# 回执与日志是中间产物(不入库),但 .gitignore 本身必须入库——漏了就等于把它们纳入版本管理。
|
||||
# 每次跑批前自愈重建,避免「清目录重跑」把 .gitignore 一起带走(2026-10-15 实踩)。
|
||||
mkdir -p "$STAMP_DIR"
|
||||
if [ ! -f "$STAMP_DIR/.gitignore" ]; then
|
||||
printf '# 本目录只入库 baseline.json(存量基线,需随代码走以保证各 worktree 判定口径一致)。\n# receipt.json 是每跑批覆写的当次回执、*.log 是跑批当场日志——两者都是中间产物,不入库。\nreceipt.json\n*.log\n' \
|
||||
> "$STAMP_DIR/.gitignore"
|
||||
echo "[gates] 已自愈重建 $STAMP_DIR/.gitignore"
|
||||
fi
|
||||
|
||||
# ── python 解释器解析:优先带 PIL 的 gamedev venv(渲染闸的 shot_checker/golden_compare 依赖),
|
||||
# 回落 PATH 上的 python。渲染闸的三个脚本要 PIL,用错解释器会假红。
|
||||
PY=""
|
||||
@@ -44,7 +53,6 @@ case "$PY" in
|
||||
*/Scripts/python.exe|*/Scripts/python) export PATH="$(dirname "$PY"):$PATH" ;;
|
||||
esac
|
||||
|
||||
mkdir -p "$STAMP_DIR"
|
||||
declare -a NAMES=() EXITS=() LOGS=()
|
||||
FAILED=0
|
||||
|
||||
|
||||
Reference in new issue
Block a user