Deploy from a WSL checkout, from boilerplate 1679e88

When the checkout lives under \\wsl.localhost, step 1 runs its tests in the
distro through deploy/test-commit.sh and db.ps1 push makes its snapshot
there, because the .venv is a Linux one. pipeline/context.py narrows by
sys.platform so mypy passes on Linux. See boilerplate docs/wsl.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-26 19:43:50 +02:00
1 parent 36860f0cfe
commit 515d2250fc
5 files changed
+52 -4

No files matched your search

+10
View File
@@ -16,6 +16,16 @@ $ErrorActionPreference = 'Stop'
#: directory, so the scripts can be run from anywhere.
$root = Split-Path -Parent $PSScriptRoot
#: A checkout inside WSL, run from Windows as \\wsl.localhost\<distro>\... Its
#: .venv is a Linux one, so the steps that run Python hand that part to the
#: distro. $Wsl.Groups[1] is the distro; ConvertTo-LinuxPath turns a path under
#: the checkout into the distro's own. See docs/wsl.md.
$WslPattern = '^\\\\wsl(?:\.localhost|\$)\\([^\\]+)(\\.*)$'
$Wsl = [regex]::Match($root, $WslPattern)
function ConvertTo-LinuxPath([string] $Path) {
[regex]::Match($Path, $WslPattern).Groups[2].Value -replace '\\', '/'
}
function Assert-Ok([string] $What) {
if ($LASTEXITCODE -ne 0) { throw "$What failed (exit $LASTEXITCODE)" }
}