diff --git a/.github/generate-dist-files-size-diff.mjs b/.github/generate-dist-files-size-diff.mjs index fc909daf1a1..3f9022d1c4b 100644 --- a/.github/generate-dist-files-size-diff.mjs +++ b/.github/generate-dist-files-size-diff.mjs @@ -72,7 +72,7 @@ export function main() { const base = JSON.parse(process.env.BASE_DIST_FILES); /** @type {Record} */ const pr = JSON.parse(process.env.PR_DIST_FILES); - let output = '

📊 Dist packagesFiles size difference

\n\n'; + let output = '

📊 Packages dist files size difference

\n\n'; /** * @type {Map FileBefore (Size / Gzip)After (Size / Gzip) diff --git a/.github/workflows/dist-files-size-diff.yaml b/.github/workflows/dist-files-size-diff.yaml index cf5eabd84a2..ef80d89abc4 100644 --- a/.github/workflows/dist-files-size-diff.yaml +++ b/.github/workflows/dist-files-size-diff.yaml @@ -25,7 +25,7 @@ jobs: run: | set -e - FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do + FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}" done | jq -s 'add' -c) @@ -38,7 +38,7 @@ jobs: run: | set -e - FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do + FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}" done | jq -s 'add' -c)