tools/node-modules: Break up known non-text files patterns

This makes the list easier to maintain.
This commit is contained in:
Martin Pitt 2026-01-30 03:22:38 +01:00 committed by Allison Karlitskaya
parent 2a6169de14
commit 93d6090052

View file

@ -156,8 +156,17 @@ cmd_runtime_tar() {
# and resolve/test/resolver/cup.coffee which is a single-byte test file
# Ubuntu 24.04's file (or at least not that in the GitHub actions runner) does not detect *.woff2 file type properly
for pkg in $runtime_pkgs; do
if find "$pkg" -type f -print0 | xargs -0 file --mime |
grep -Ev 'text/|inode/x-empty|application/(javascript|json)|font/|image/|sbcs-data-generated.js|cup.coffee|\.woff'; then
if find "$pkg" -type f -print0 |
xargs -0 file --mime |
grep -Ev \
-e 'text/' \
-e 'inode/x-empty' \
-e 'application/(javascript|json)' \
-e 'font/' \
-e 'image/' \
-e 'sbcs-data-generated.js' \
-e 'cup.coffee' \
-e '\.woff'; then
echo "Error: package '$pkg' contains architecture dependent files, cannot include in runtime tarball" >&2
exit 1
fi