2026-02-07 22:31:11 +01:00
|
|
|
# Publish Script for Cirno No Reason
|
|
|
|
|
# Publishes builds to itch.io using Butler
|
|
|
|
|
|
|
|
|
|
# Import the module
|
|
|
|
|
$modulePath = Join-Path $PSScriptRoot "CirnoBuild.psm1"
|
|
|
|
|
Import-Module $modulePath -Force
|
|
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
$butlerPath = "F:\Apps\butler\butler.exe"
|
|
|
|
|
$releaseDir = ".\release"
|
2025-02-24 17:17:46 +01:00
|
|
|
$buildDir = ".\build"
|
2026-02-07 22:31:11 +01:00
|
|
|
$godotPath = $env:GODOT
|
|
|
|
|
$platforms = Get-PlatformConfigurations
|
|
|
|
|
|
|
|
|
|
# Validate prerequisites
|
|
|
|
|
$prereqResult = Test-Prerequisites -GodotPath $godotPath -ButlerPath $butlerPath
|
|
|
|
|
if (-not $prereqResult.Valid) {
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
2025-02-24 17:17:46 +01:00
|
|
|
|
2026-02-07 22:31:11 +01:00
|
|
|
# Use resolved path if available
|
|
|
|
|
if ($prereqResult.ResolvedGodotPath) {
|
|
|
|
|
$godotPath = $prereqResult.ResolvedGodotPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host "Getting version information..."
|
|
|
|
|
$versionInfo = Get-VersionInfo
|
2025-02-24 17:17:46 +01:00
|
|
|
|
2026-02-07 22:31:11 +01:00
|
|
|
Write-Host ""
|
2025-02-24 17:17:46 +01:00
|
|
|
|
2025-05-09 10:18:40 +02:00
|
|
|
# Ensure output directory exists
|
2026-02-07 22:31:11 +01:00
|
|
|
if (!(Test-Path $releaseDir)) {
|
|
|
|
|
New-Item -ItemType Directory -Path $releaseDir | Out-Null
|
2025-02-24 17:17:46 +01:00
|
|
|
}
|
|
|
|
|
|
2026-02-07 22:31:11 +01:00
|
|
|
# Publish all platforms
|
|
|
|
|
$results = @{}
|
|
|
|
|
foreach ($platformKey in $platforms.Keys) {
|
|
|
|
|
$results[$platformKey] = Publish-PlatformBuild `
|
|
|
|
|
-Platform $platformKey `
|
|
|
|
|
-VersionInfo $versionInfo `
|
|
|
|
|
-BuildDir $buildDir `
|
|
|
|
|
-ReleaseDir $releaseDir `
|
|
|
|
|
-ButlerPath $butlerPath
|
|
|
|
|
Write-Host ""
|
2025-05-09 10:18:40 +02:00
|
|
|
}
|
2026-02-07 22:31:11 +01:00
|
|
|
# Summary
|
|
|
|
|
Write-Host "=====================================" -ForegroundColor Cyan
|
|
|
|
|
Write-Host " Publish Summary" -ForegroundColor Cyan
|
|
|
|
|
Write-Host "=====================================" -ForegroundColor Cyan
|
|
|
|
|
foreach ($platformKey in $results.Keys) {
|
|
|
|
|
$status = if ($results[$platformKey]) { "SUCCESS" } else { "FAILED" }
|
|
|
|
|
$color = if ($results[$platformKey]) { "Green" } else { "Red" }
|
|
|
|
|
$platformName = $platforms[$platformKey].ExportName
|
|
|
|
|
Write-Host " $platformName : $status" -ForegroundColor $color
|
|
|
|
|
}
|
|
|
|
|
Write-Host ""
|