Skip to content

Commit 566364e

Browse files
committed
fix: set CGO_ENABLED=0 in build-release.ps1 for cross-compilation
1 parent 3d9eb70 commit 566364e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

build-release.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ $BUILD_TIME = (Get-Date).ToUniversalTime().ToString('o')
2222
$GIT_COMMIT = git rev-parse --short HEAD 2>$null
2323
if (-not $GIT_COMMIT) { $GIT_COMMIT = "unknown" }
2424

25+
# Disable CGO for static cross-compiled binaries
26+
$env:CGO_ENABLED = "0"
27+
2528
# Build targets with version information
2629
Write-Host "Building for Linux AMD64..." -ForegroundColor Yellow
2730
$env:GOOS = "linux"; $env:GOARCH = "amd64"

0 commit comments

Comments
 (0)