Improve validation: use unzip -Z1 and increase min size threshold

Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 19:02:21 +00:00
parent a49b6f523e
commit 1b8ab775d3
+5 -4
View File
@@ -79,7 +79,7 @@ jobs:
exit 1 exit 1
fi fi
FILE_COUNT=$(unzip -l eqemu-server-linux-x64.zip | grep -v "Archive:" | grep -v "Length" | grep -v "---" | grep -v "files" | wc -l) FILE_COUNT=$(unzip -Z1 eqemu-server-linux-x64.zip | wc -l)
if [ "$FILE_COUNT" -lt 6 ]; then if [ "$FILE_COUNT" -lt 6 ]; then
echo "Error: Zip file contains fewer than expected files ($FILE_COUNT)" echo "Error: Zip file contains fewer than expected files ($FILE_COUNT)"
unzip -l eqemu-server-linux-x64.zip unzip -l eqemu-server-linux-x64.zip
@@ -187,10 +187,11 @@ jobs:
exit 1 exit 1
} }
# Verify zip contains files # Verify zip contains files (minimum 100KB - should contain at least the core binaries)
$zipInfo = Get-Item $outZip $zipInfo = Get-Item $outZip
if ($zipInfo.Length -lt 1KB) { $minSize = 100KB
Write-Host "Error: Zip file is suspiciously small ($($zipInfo.Length) bytes)" if ($zipInfo.Length -lt $minSize) {
Write-Host "Error: Zip file is suspiciously small ($($zipInfo.Length) bytes, expected at least $minSize)"
exit 1 exit 1
} }