From b369cfd81ab579060d0ff81a8bdbe52b57a72136 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Sun, 26 Jul 2026 13:36:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20safesightd.ps1=20=E6=98=BE=E5=BC=8F?= =?UTF-8?q?=E6=8C=87=E5=AE=9Awindows/amd64=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/safesightd.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/safesightd.ps1 b/scripts/safesightd.ps1 index 63e6f00..e1359af 100644 --- a/scripts/safesightd.ps1 +++ b/scripts/safesightd.ps1 @@ -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" }