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:
1 parent
36860f0cfe
commit
515d2250fc
5 files changed
+52
-4
No files matched your search
+9
-1
@@ -84,7 +84,15 @@ with tempfile.TemporaryDirectory() as work:
|
||||
with plain.open("rb") as raw, gzip.open(target, "wb") as out:
|
||||
shutil.copyfileobj(raw, out)
|
||||
'@
|
||||
& $Python -c $snapshot $LocalDb $snap; Assert-Ok 'snapshot'
|
||||
# A checkout inside WSL has a Linux .venv, and SQLite cannot lock a WAL
|
||||
# database through the \\wsl.localhost share, so the snapshot is taken in
|
||||
# the distro. The script goes in on stdin, past both shells.
|
||||
if ($Wsl.Success) {
|
||||
$snapshot | wsl.exe -d $Wsl.Groups[1].Value --cd (ConvertTo-LinuxPath $root) --exec .venv/bin/python - (ConvertTo-LinuxPath $LocalDb) (ConvertTo-LinuxPath $snap)
|
||||
} else {
|
||||
& $Python -c $snapshot $LocalDb $snap
|
||||
}
|
||||
Assert-Ok 'snapshot'
|
||||
' {0:N1} MB' -f ((Get-Item $snap).Length / 1MB) | Write-Host
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user