feat: verify license responses with public key

This commit is contained in:
ShukeBta
2026-06-25 14:46:28 +08:00
parent a4a93b7fed
commit 0da96f7e4e
12 changed files with 200 additions and 44 deletions
+20
View File
@@ -0,0 +1,20 @@
param(
[string]$Output = "bin/mediastation-go-protected.exe",
[switch]$Garble
)
$ErrorActionPreference = "Stop"
$env:CGO_ENABLED = "0"
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $Output) | Out-Null
if ($Garble) {
if (-not (Get-Command garble -ErrorAction SilentlyContinue)) {
throw "garble is not installed. Run: go install mvdan.cc/garble@latest"
}
garble -literals -tiny build -trimpath -ldflags="-s -w -buildid=" -o $Output ./cmd/server
exit $LASTEXITCODE
}
go build -trimpath -buildvcs=false -ldflags="-s -w -buildid=" -o $Output ./cmd/server
exit $LASTEXITCODE