Prepare 0.3.0-rc.2 with Windows support and regression tests

This commit is contained in:
2026-04-04 12:35:36 -04:00
parent a00d68b725
commit 220296c3f7
23 changed files with 448 additions and 123 deletions

View File

@@ -0,0 +1,62 @@
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$script:RepoRoot = Split-Path -Parent $PSScriptRoot
function Require-Tool {
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[string]$Hint
)
if (Get-Command $Name -ErrorAction SilentlyContinue) {
return
}
throw "Required tool '$Name' was not found on PATH. $Hint"
}
function Warn-If-Missing {
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[string]$Hint
)
if (Get-Command $Name -ErrorAction SilentlyContinue) {
return
}
Write-Warning "Optional tool '$Name' was not found on PATH. $Hint"
}
function Invoke-Native {
param(
[Parameter(Mandatory = $true)]
[string[]]$Command,
[string]$WorkingDirectory = $script:RepoRoot,
[string]$Label = ""
)
if ($Label) {
Write-Host "── $Label ──"
}
Push-Location $WorkingDirectory
try {
if ($Command.Count -gt 1) {
& $Command[0] @($Command[1..($Command.Count - 1)])
} else {
& $Command[0]
}
if ($LASTEXITCODE -ne 0) {
throw "Command failed ($LASTEXITCODE): $($Command -join ' ')"
}
} finally {
Pop-Location
}
}