Files
Art-gallery/infra/scripts/lib/Deploy-CliResult.ps1
T
Danila KhodjaefandCursor 21e3e41e48 Add one-command dev-to-prod release with clear SUCCESS/FAILED banners.
Introduce devtoprod:release orchestrator, config file, CLI result footers on deploy scripts, auto-thumb regeneration on curator fixes, and updated deploy documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 14:54:56 +03:00

30 lines
789 B
PowerShell

# Standardized final SUCCESS/FAILED banner for deploy PowerShell scripts.
$script:DeployCliResultWidth = 72
function Write-DeployCliResult {
param(
[Parameter(Mandatory = $true)]
[string]$Script,
[Parameter(Mandatory = $true)]
[bool]$Success,
[string]$Summary = '',
[string[]]$Details = @()
)
$label = if ($Success) { 'SUCCESS' } else { 'FAILED' }
$banner = "===== ${label}: $Script ====="
$pad = [Math]::Max(0, $script:DeployCliResultWidth - $banner.Length)
$line = $banner + ('=' * $pad)
Write-Host ''
Write-Host $line
if ($Summary) { Write-Host $Summary }
foreach ($detail in $Details) {
if ($detail) { Write-Host $detail }
}
Write-Host ('=' * $script:DeployCliResultWidth)
}