Fix Divine pack command and validate package output
Some checks failed
Build Mod Package / build (push) Failing after 5s

This commit is contained in:
2026-04-08 00:24:51 +03:00
parent 68d3f4f9a3
commit ca2b0ec3a1

View File

@@ -93,12 +93,17 @@ jobs:
throw "Divine.exe was not found in the downloaded LSLib release." throw "Divine.exe was not found in the downloaded LSLib release."
} }
& $divine.FullName -a create-package -g bg3 -s $modsPath -d $packagePath & $divine.FullName -a pack -g bg3 -s $modsPath -d $packagePath
if (-not (Test-Path -LiteralPath "build/DnD 5.5e AIO Russian.pak")) { if (-not (Test-Path -LiteralPath "build/DnD 5.5e AIO Russian.pak")) {
throw "Package was not created." throw "Package was not created."
} }
$packageFile = Get-Item -LiteralPath $packagePath
if ($packageFile.Length -lt 1024) {
throw "Package looks invalid: '$packagePath' is only $($packageFile.Length) bytes."
}
if (Test-Path -LiteralPath $zipPath) { if (Test-Path -LiteralPath $zipPath) {
Remove-Item -LiteralPath $zipPath -Force Remove-Item -LiteralPath $zipPath -Force
} }
@@ -121,7 +126,7 @@ jobs:
} }
) )
MD5 = $packageMd5 MD5 = $packageMd5
} | ConvertTo-Json } | ConvertTo-Json -Depth 4
Set-Content -LiteralPath $infoJsonPath -Value $infoJson -Encoding utf8 Set-Content -LiteralPath $infoJsonPath -Value $infoJson -Encoding utf8