fix(compat): stage before diff in commit step (untracked-file blind spot)
All checks were successful
addon-qualify / qualify (push) Successful in 12s
All checks were successful
addon-qualify / qualify (push) Successful in 12s
This commit is contained in:
@@ -111,12 +111,21 @@ jobs:
|
||||
git config user.email "compat-seeder@odoosky.cloud"
|
||||
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"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git add compat-bootstrap/seeded-ci.json
|
||||
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})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user