Files
HSUI/create-release.ps1
T

30 lines
868 B
PowerShell

# Creates a complete HSUI release zip with all required files.
# Run after: dotnet build -c Release
# Output: bin/Release/HSUI/latest.zip
$ErrorActionPreference = "Stop"
$ReleaseDir = "$PSScriptRoot\bin\Release"
$ZipPath = "$ReleaseDir\HSUI\latest.zip"
# Required files - must match what dev plugin loads from
$Files = @(
"$ReleaseDir\HSUI.dll",
"$ReleaseDir\HSUI.json",
"$ReleaseDir\changelog.md",
"$ReleaseDir\KamiToolKit.dll",
"$ReleaseDir\Colourful.dll",
"$ReleaseDir\Newtonsoft.Json.dll",
"$ReleaseDir\SixLabors.ImageSharp.dll",
"$ReleaseDir\Media",
"$ReleaseDir\Assets"
)
foreach ($f in $Files) {
if (-not (Test-Path $f)) { throw "Missing: $f" }
}
if (Test-Path $ZipPath) { Remove-Item $ZipPath -Force }
Compress-Archive -Path $Files -DestinationPath $ZipPath -CompressionLevel Optimal
Write-Host "Created: $ZipPath"