mirror of
https://github.com/BigMarc/timebunny-release.git
synced 2026-10-13 17:03:09 +02:00
ci: findstr never opened the binary, so the URL gate was inert
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
179b6aa59a
commit
b63e591c75
16
.github/workflows/build-windows.yml
vendored
16
.github/workflows/build-windows.yml
vendored
@ -58,16 +58,22 @@ jobs:
|
|||||||
|
|
||||||
# Same gate as the private repo's release workflow: an agent baked against localhost looks
|
# Same gate as the private repo's release workflow: an agent baked against localhost looks
|
||||||
# perfectly healthy in CI and is simply never heard from once someone installs it.
|
# perfectly healthy in CI and is simply never heard from once someone installs it.
|
||||||
|
# Deliberately not findstr: it reads a leading `/` in a path as a switch prefix, so
|
||||||
|
# `src-tauri/target/...` fails with "Cannot open" and exits 2 — which reads as "string not
|
||||||
|
# found" and would let a localhost build sail through the check that exists to stop it.
|
||||||
- name: Verify the baked server URL
|
- name: Verify the baked server URL
|
||||||
working-directory: apps/agent
|
working-directory: apps/agent
|
||||||
run: |
|
run: |
|
||||||
$exe = "src-tauri/target/release/timebunny-agent.exe"
|
$exe = Join-Path $PWD "src-tauri\target\release\timebunny-agent.exe"
|
||||||
& findstr /C:"http://localhost:3000" $exe > $null
|
if (-not (Test-Path $exe)) { throw "No agent binary at $exe" }
|
||||||
if ($LASTEXITCODE -eq 0) {
|
$text = [System.Text.Encoding]::ASCII.GetString([System.IO.File]::ReadAllBytes($exe))
|
||||||
|
if ($text.Contains("http://localhost:3000")) {
|
||||||
throw "Agent binary still carries the localhost fallback - TIMEBUNNY_API_URL was not set at build time"
|
throw "Agent binary still carries the localhost fallback - TIMEBUNNY_API_URL was not set at build time"
|
||||||
}
|
}
|
||||||
& findstr /C:"https://time.bunny.team" $exe > $null
|
if (-not $text.Contains("https://time.bunny.team")) {
|
||||||
if ($LASTEXITCODE -ne 0) { throw "Agent binary does not contain the production API URL" }
|
throw "Agent binary does not contain the production API URL"
|
||||||
|
}
|
||||||
|
Write-Host "ok: production URL baked, no localhost fallback"
|
||||||
|
|
||||||
- name: Checksum
|
- name: Checksum
|
||||||
working-directory: apps/agent
|
working-directory: apps/agent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user