Build server: the overlay re-stamps files only (a tree whose files were all identical listed only directories and failed the pipeline)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
7bc38641dd
commit
a1ecb37bef
1 changed files with 7 additions and 5 deletions
|
|
@ -121,18 +121,20 @@ bs_push_and_checkout() {
|
|||
# visible here and tools/ci/copied-sources-check.sh sees it. target dirs and .git never travel; --delete keeps the box equal to
|
||||
# the Mac inside the directory (excluded paths are protected).
|
||||
bs_overlay_dir() {
|
||||
local rel="$1" src="$BS_WT_ROOT/$1" dst="$BS_REMOTE_WT/$1" list n
|
||||
local rel="$1" src="$BS_WT_ROOT/$1" dst="$BS_REMOTE_WT/$1" list nfiles ndirs
|
||||
[ -d "$src" ] || bs_die "no $src"
|
||||
list=$(mktemp)
|
||||
bs_ssh "mkdir -p '$dst'"
|
||||
bs_rsync -rlpgoD --checksum --delete --out-format='%n' \
|
||||
--exclude '/target' --exclude '/target-*' --exclude '/target/' --exclude 'target-*/' --exclude '.git' --exclude '.DS_Store' --exclude 'node_modules' \
|
||||
"$src/" "$BS_HOST:$dst/" > "$list" || { rm -f "$list"; bs_die "rsync of $rel failed"; }
|
||||
n=$(grep -c . "$list" || true)
|
||||
if [ "$n" -gt 0 ]; then
|
||||
grep -v '/$' "$list" | tr '\n' '\0' | bs_ssh "cd '$dst' && xargs -0 -r touch --no-create" || bs_die "re-stamp of $rel failed"
|
||||
# files only: directories are listed whenever an attribute differs (a fresh clone's ownership), and a tree whose files
|
||||
# were all identical lists ONLY directories (first run of 6 October 2026: an empty file list failed the pipeline)
|
||||
nfiles=$(grep -vc '/$' "$list" || true); ndirs=$(grep -c '/$' "$list" || true)
|
||||
if [ "${nfiles:-0}" -gt 0 ]; then
|
||||
if ! grep -v '/$' "$list" | tr '\n' '\0' | bs_ssh "cd '$dst' && xargs -0 -r touch --no-create"; then rm -f "$list"; bs_die "re-stamp of $rel failed"; fi
|
||||
fi
|
||||
bs_log "overlay $rel -> $dst: $n entr$( [ "$n" = 1 ] && echo y || echo ies) written and re-stamped"
|
||||
bs_log "overlay $rel -> $dst: ${nfiles:-0} file(s) written and re-stamped, ${ndirs:-0} dir(s)"
|
||||
rm -f "$list"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue