chore: sync local updates

This commit is contained in:
2026-05-16 19:03:04 +08:00
parent b86ce4a73a
commit 14cd94c88d
45 changed files with 2983 additions and 4127 deletions

View File

@@ -0,0 +1,12 @@
$ErrorActionPreference = "Stop"
Set-Location $PSScriptRoot
New-Item -ItemType Directory -Force -Path dist | Out-Null
$env:CGO_ENABLED = "0"
$env:GOOS = "linux"
$env:GOARCH = "amd64"
$out = Join-Path $PSScriptRoot "dist\mengyaconnect-backend"
go build -trimpath -ldflags="-s -w" -o $out .
$b = [IO.File]::ReadAllBytes($out)
if ($b.Length -ge 4 -and $b[0] -eq 0x7F -and $b[1] -eq 0x45) { Write-Host "OK: Linux ELF amd64 -> $out" }
elseif ($b[0] -eq 0x4D -and $b[1] -eq 0x5A) { throw "Got Windows PE — check go env" }
else { throw "Unknown output format" }