feat(tools): visual dev snapshots for compare images

This commit is contained in:
2026-08-25 16:25:30 +05:00
parent 83f3f7bd12
commit 26ac5e6003
3 changed files with 149 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
param(
[string]$Out = "tools/out/app.png",
[switch]$NoBuild
)
$ErrorActionPreference = "Stop"
if (-not $NoBuild) {
cargo build
if ($LASTEXITCODE -ne 0) { exit 1 }
}
$exe = Join-Path $PWD "target\debug\bropicker.exe"
if (-not (Test-Path $exe)) {
Write-Error "bropicker.exe not found, build first"
exit 1
}
$proc = Start-Process -FilePath $exe -WorkingDirectory $PWD -PassThru
Start-Sleep -Milliseconds 1800
& "$PSScriptRoot\shot.ps1" -ProcId $proc.Id -Out $Out
$shotOk = ($LASTEXITCODE -eq 0)
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
if (-not $shotOk) { exit 1 }