Site: trailer encoded smaller (CRF 23, 3.5 Mbit/s cap) to fit Cloudflare Pages' 25 MiB file limit; make_site.sh refuses an oversized file
This commit is contained in:
@@ -52,3 +52,12 @@ DATA=build/site_data.json
|
||||
|| { echo "couldn't dump the game data for the guide"; exit 1; }
|
||||
python3 tools/site/make_guide.py "$DATA" build/site || exit 1
|
||||
rm -f "$DATA"
|
||||
|
||||
# Cloudflare Pages refuses any file over 25 MiB: catch it here, not at deploy.
|
||||
LIMIT=26214400
|
||||
for f in build/site/*; do
|
||||
s=$(stat -f %z "$f" 2>/dev/null || stat -c %s "$f")
|
||||
if [ "$s" -ge "$LIMIT" ]; then
|
||||
echo "$f is $s bytes: over Cloudflare Pages' 25 MiB limit (re-encode the trailer smaller)"; exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user