fix: safesightd.ps1 显式指定windows/amd64平台

This commit is contained in:
tian 2026-07-26 13:36:46 +08:00
parent 8f7467bb63
commit b369cfd81a

View File

@ -82,10 +82,12 @@ function Show-Health {
}
function Invoke-Build {
Write-Info "编译 safesightd.exe ..."
Write-Info "编译 safesightd.exe (windows/amd64) ..."
Push-Location $rootDir
try {
& go build -o $exePath .\cmd\safesightd
$env:GOOS = "windows"
$env:GOARCH = "amd64"
& go build -ldflags="-s -w" -o $exePath .\cmd\safesightd
if ($LASTEXITCODE -ne 0) {
throw "go build failed with exit code $LASTEXITCODE"
}