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>
This commit is contained in:
Danila Khodjaef
2026-07-08 14:54:56 +03:00
co-authored by Cursor
parent 313666a4ab
commit 21e3e41e48
20 changed files with 839 additions and 86 deletions
+8 -5
View File
@@ -12,6 +12,8 @@ param(
)
$ErrorActionPreference = "Stop"
. (Join-Path $PSScriptRoot "lib\Deploy-CliResult.ps1")
$Source = (Resolve-Path $Source -ErrorAction Stop).Path
Write-Host "Source: $Source"
@@ -20,8 +22,8 @@ Write-Host "Dest: $Dest"
if (-not $SkipConfirm) {
$confirm = Read-Host "Copy all files (skip older)? Type yes"
if ($confirm -ne "yes") {
Write-Host "Aborted."
exit 0
Write-DeployCliResult -Script 'sync-images-to-prod' -Success $false -Summary 'Image sync aborted by user.'
exit 1
}
}
@@ -34,7 +36,7 @@ if ($env:SMB_USER -and $env:SMB_PASSWORD) {
Write-Warning "Map the share first, e.g.:"
Write-Warning (' net use ' + $smbRoot + ' /user:YOUR_TRUENAS_USER')
Write-Warning 'or set $env:SMB_USER and $env:SMB_PASSWORD before running this script.'
Write-Error 'SMB share not reachable - aborting before robocopy.'
Write-DeployCliResult -Script 'sync-images-to-prod' -Success $false -Summary 'SMB share not reachable - aborting before robocopy.'
exit 1
}
@@ -49,8 +51,9 @@ try {
robocopy $Source $Dest /E /XO /R:2 /W:3 /NFL /NDL /NJH /NJS
$code = $LASTEXITCODE
if ($code -ge 8) {
Write-Error "robocopy failed with exit code $code"
Write-DeployCliResult -Script 'sync-images-to-prod' -Success $false -Summary "robocopy failed with exit code $code"
exit $code
}
Write-Host "Image sync complete (robocopy exit $code)."
Write-DeployCliResult -Script 'sync-images-to-prod' -Success $true -Summary 'Image sync complete.' -Details @("robocopy exit code: $code", "Dest: $Dest")
exit 0