Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05259e1f26 | |||
| 3476112815 | |||
| ca2b0ec3a1 |
@@ -74,15 +74,16 @@ jobs:
|
|||||||
$modName = "DnD 5.5e All-in-One BEYOND Russian Localization"
|
$modName = "DnD 5.5e All-in-One BEYOND Russian Localization"
|
||||||
$modFolder = "DnD 5.5e AIO Russian"
|
$modFolder = "DnD 5.5e AIO Russian"
|
||||||
$modUuid = "6401e84d-daf2-416d-adeb-99c03a2487a6"
|
$modUuid = "6401e84d-daf2-416d-adeb-99c03a2487a6"
|
||||||
$modDescription = "Русская локализация мода DnD 5.5e All-in-One BEYOND."
|
$modDescription = "Russian Localization"
|
||||||
$modAuthor = "MikhailRaw"
|
$modAuthor = "MikhailRaw"
|
||||||
$modVersion64 = "36028797018963968"
|
$modVersion64 = "36028797018963968"
|
||||||
$modGroup = "6401e84d-daf2-416d-adeb-99c03a2487a6"
|
$modGroup = "6401e84d-daf2-416d-adeb-99c03a2487a6"
|
||||||
if ($refName -and $refName -like "v*") {
|
if ($refName -and $refName -like "v*") {
|
||||||
$archiveBaseName = "DnD 5.5e AIO Russian $refName"
|
$archiveBaseName = "DnD 5.5e AIO Russian $refName"
|
||||||
}
|
}
|
||||||
$modsPath = [System.IO.Path]::GetFullPath((Join-Path $workspace "Mods"))
|
$stagingPath = [System.IO.Path]::GetFullPath((Join-Path $workspace ".build-stage"))
|
||||||
$packagePath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/DnD 5.5e AIO Russian.pak"))
|
$packagePath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/DnD 5.5e AIO Russian.pak"))
|
||||||
|
$tempPackagePath = [System.IO.Path]::GetFullPath((Join-Path $env:TEMP "DnD 5.5e AIO Russian.pak"))
|
||||||
$zipPath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/$archiveBaseName.zip"))
|
$zipPath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/$archiveBaseName.zip"))
|
||||||
$infoJsonPath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/info.json"))
|
$infoJsonPath = [System.IO.Path]::GetFullPath((Join-Path $workspace "build/info.json"))
|
||||||
$divine = Get-ChildItem -Path ".tools/lslib" -Recurse -File |
|
$divine = Get-ChildItem -Path ".tools/lslib" -Recurse -File |
|
||||||
@@ -93,12 +94,36 @@ 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
|
if (Test-Path -LiteralPath $stagingPath) {
|
||||||
|
Remove-Item -LiteralPath $stagingPath -Recurse -Force
|
||||||
|
}
|
||||||
|
if (Test-Path -LiteralPath $tempPackagePath) {
|
||||||
|
Remove-Item -LiteralPath $tempPackagePath -Force
|
||||||
|
}
|
||||||
|
if (Test-Path -LiteralPath $packagePath) {
|
||||||
|
Remove-Item -LiteralPath $packagePath -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Path $stagingPath | Out-Null
|
||||||
|
Copy-Item -LiteralPath (Join-Path $workspace "Mods") -Destination $stagingPath -Recurse
|
||||||
|
|
||||||
|
& $divine.FullName -a create-package -g bg3 -s $stagingPath -d $tempPackagePath
|
||||||
|
|
||||||
|
if (-not (Test-Path -LiteralPath $tempPackagePath)) {
|
||||||
|
throw "Temporary package was not created."
|
||||||
|
}
|
||||||
|
|
||||||
|
Move-Item -LiteralPath $tempPackagePath -Destination $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 +146,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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user