fix(compat): stage before diff in commit step (untracked-file blind spot)
All checks were successful
addon-qualify / qualify (push) Successful in 12s

This commit is contained in:
compat-seeder
2026-05-10 00:16:31 +03:00
parent 2f7fd6385d
commit d32422c5e2

View File

@@ -111,12 +111,21 @@ jobs:
git config user.email "compat-seeder@odoosky.cloud" git config user.email "compat-seeder@odoosky.cloud"
git config user.name "compat-seeder" git config user.name "compat-seeder"
if git diff --quiet -- compat-bootstrap/seeded-ci.json; then if [ ! -f compat-bootstrap/seeded-ci.json ]; then
echo "ERROR: seeded-ci.json was not produced; aborting"
exit 1
fi
# Stage first, then diff against index — this catches both
# "tracked file changed" and "new file appeared" cases. The
# bare `git diff --quiet` form silently passes for untracked
# files (no diff = exit 0), which masked the very-first run.
git add compat-bootstrap/seeded-ci.json
if git diff --cached --quiet -- compat-bootstrap/seeded-ci.json; then
echo "no content change in seeded-ci.json; nothing to commit" echo "no content change in seeded-ci.json; nothing to commit"
exit 0 exit 0
fi fi
git add compat-bootstrap/seeded-ci.json
stamp=$(python3 -c "import json,sys; print(json.load(open('compat-bootstrap/seeded-ci.json'))['stampId'])") stamp=$(python3 -c "import json,sys; print(json.load(open('compat-bootstrap/seeded-ci.json'))['stampId'])")
git commit -m "chore(compat): refresh cold-start seed (${stamp})" git commit -m "chore(compat): refresh cold-start seed (${stamp})"