Track latest mod zip artifact

This commit is contained in:
Kroonk
2026-05-23 10:37:01 +02:00
parent d3d66c863b
commit a5b7165bf7
6 changed files with 40 additions and 3 deletions

View File

@@ -9,16 +9,22 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem
$root = Split-Path -Parent $PSScriptRoot
$source = Join-Path $root "src"
$dist = Join-Path $root "dist"
$releases = Join-Path $root "releases"
$zipPath = Join-Path $dist "Brogether-Brogether-$Version.zip"
$releaseZipPath = Join-Path $releases "Brogether-Brogether-$Version.zip"
if (-not (Test-Path $source)) {
throw "Missing source folder: $source"
}
New-Item -ItemType Directory -Force -Path $dist | Out-Null
New-Item -ItemType Directory -Force -Path $releases | Out-Null
if (Test-Path $zipPath) {
Remove-Item -LiteralPath $zipPath -Force
}
if (Test-Path $releaseZipPath) {
Remove-Item -LiteralPath $releaseZipPath -Force
}
$archive = [System.IO.Compression.ZipFile]::Open($zipPath, [System.IO.Compression.ZipArchiveMode]::Create)
try {
@@ -37,4 +43,6 @@ finally {
$archive.Dispose()
}
Copy-Item -LiteralPath $zipPath -Destination $releaseZipPath -Force
Write-Host "Created $zipPath"
Write-Host "Updated release artifact $releaseZipPath"