# 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" $buildDir = ".\build" $godotPath = $env:GODOT $platforms = Get-PlatformConfigurations # Validate prerequisites $prereqResult = Test-Prerequisites -GodotPath $godotPath -ButlerPath $butlerPath if (-not $prereqResult.Valid) { exit 1 } # Use resolved path if available if ($prereqResult.ResolvedGodotPath) { $godotPath = $prereqResult.ResolvedGodotPath } Write-Host "Getting version information..." $versionInfo = Get-VersionInfo Write-Host "" # Ensure output directory exists if (!(Test-Path $releaseDir)) { New-Item -ItemType Directory -Path $releaseDir | Out-Null } # 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 "" } # 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 ""