File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,23 @@ git checkout "$DEP01_CONFIG"
6565
6666# Rebuild to regenerate any artifacts that were removed by `rewatch clean`
6767# but not rebuilt due to the modified config (e.g. Dep01.mjs).
68- rewatch build > /dev/null 2>&1
68+ if ! rewatch build > /dev/null 2>&1 ; then
69+ error " Rebuild after restoring config failed"
70+ rm -f rewatch.log
71+ exit 1
72+ fi
73+
74+ # Slow CI runners can still be catching up on file restoration when the build
75+ # command returns. Wait until git no longer sees tracked deletions before doing
76+ # the final cleanliness check.
77+ timeout=20
78+ while [ " $timeout " -gt 0 ]; do
79+ if [ -z " $( git diff --name-only --diff-filter=D .) " ]; then
80+ break
81+ fi
82+ sleep 1
83+ timeout=$(( timeout - 1 ))
84+ done
6985rm -f rewatch.log
7086
7187if git diff --exit-code . > /dev/null 2>&1 && [ -z " $( git ls-files --others --exclude-standard .) " ];
You can’t perform that action at this time.
0 commit comments