chore(ci): update asset handling in CI scripts to exclude library.zip and *.so.yml files from processing and pruning

This commit is contained in:
Ivan 2026-06-17 12:40:22 -05:00
parent bf79c4de25
commit 005a485d52
No known key found for this signature in database
4 changed files with 23 additions and 4 deletions

View file

@ -29,6 +29,8 @@ python3 scripts/ci/slsa-predicate.py > "$PRED"
find "$DIR" -type f ! -name '*.cosign.bundle' ! -name '*.sha256' ! -name '*.intoto.jsonl' \
! -name 'builder-debug.yml' \
! -name 'library.zip' \
! -name '*.so.yml' \
! -path '*/win-unpacked/*' \
! -path '*/linux-unpacked/*' \
! -path '*/mac-universal/*' \

View file

@ -39,6 +39,10 @@ skip_noise() {
case "$base" in
builder-debug.yml | builder-debug.yml.cosign.bundle) return 0 ;;
*__builder-debug.yml | *__builder-debug.yml.cosign.bundle) return 0 ;;
library.zip | library.zip.cosign.bundle) return 0 ;;
*__library.zip | *__library.zip.cosign.bundle) return 0 ;;
*.so.yml | *.so.yml.cosign.bundle) return 0 ;;
*__*.so.yml | *__*.so.yml.cosign.bundle) return 0 ;;
esac
return 1
}

View file

@ -25,8 +25,12 @@ promote_installers_from_staging() {
echo "github-prune-electron-dist-staging.sh: promoting ${staging}/${base} -> dist/${base}"
mv -f "$file" "$dest"
done < <(
find "$staging" -type f \( \
-name '*.dmg' -o -name '*.blockmap' -o -name '*.zip' -o -name '*.yml' -o -name '*.yaml' \
find "$staging" -maxdepth 1 -type f \( \
-name '*.dmg' -o \
-name '*.blockmap' -o \
\( -name '*.zip' ! -name 'library.zip' \) -o \
\( -name '*.yml' ! -name '*.so.yml' \) -o \
\( -name '*.yaml' ! -name '*.so.yaml' \) \
\) -print0
)
}
@ -38,3 +42,10 @@ for name in win-unpacked linux-unpacked mac mac-arm64 mac-x64 mac-universal mac-
rm -rf "dist/${name}"
fi
done
while IFS= read -r -d '' stray; do
echo "github-prune-electron-dist-staging.sh: removing stray dist/$(basename "$stray")"
rm -f "$stray"
done < <(
find dist -maxdepth 1 -type f \( -name 'library.zip' -o -name '*.so.yml' \) -print0 2>/dev/null || true
)

View file

@ -26,8 +26,10 @@ tmp="$(mktemp)"
trap 'rm -f "$tmp"' EXIT
find "${roots[@]}" -type f \( \
-name '*.exe' -o -name '*.dmg' -o -name '*.blockmap' -o -name '*.yml' -o -name '*.yaml' \
\) ! -path '*/.*' -print0 \
-name '*.exe' -o -name '*.dmg' -o -name '*.blockmap' -o \
\( -name '*.yml' ! -name '*.so.yml' \) -o \
\( -name '*.yaml' ! -name '*.so.yaml' \) \
\) ! -name 'library.zip' ! -path '*/.*' -print0 \
| LC_ALL=C sort -z \
| xargs -0r sha256sum >"$tmp"