From 90c2baf343a7885aabe7e2f1ed4ce0ee21b45050 Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" Date: Sat, 3 Feb 2024 14:07:26 -0500 Subject: [PATCH] local build: ensure cgo is disabled --- build.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.ps1 b/build.ps1 index e9fa401..3fee1f4 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,26 +5,32 @@ $outDir = Join-Path -Path $scriptDir -ChildPath "/_out" # Windows x64 $env:GOARCH = "amd64" $env:GOOS = "windows" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-tool-amd64.exe ./cmd/tool $env:GOARCH = "amd64" $env:GOOS = "windows" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-install-amd64.exe ./cmd/tool # Linux x64 $env:GOARCH = "amd64" $env:GOOS = "linux" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-tool-amd64 ./cmd/tool $env:GOARCH = "amd64" $env:GOOS = "linux" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-install-amd64 ./cmd/install_only # Linux arm64 $env:GOARCH = "arm64" $env:GOOS = "linux" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-tool-arm64 ./cmd/tool $env:GOARCH = "arm64" $env:GOOS = "linux" +$env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-install-arm64 ./cmd/install_only