local build: ensure cgo is disabled

This commit is contained in:
Greg T. Wallace 2024-02-03 14:07:26 -05:00
parent 15d8996b48
commit 90c2baf343

View file

@ -5,26 +5,32 @@ $outDir = Join-Path -Path $scriptDir -ChildPath "/_out"
# Windows x64 # Windows x64
$env:GOARCH = "amd64" $env:GOARCH = "amd64"
$env:GOOS = "windows" $env:GOOS = "windows"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-tool-amd64.exe ./cmd/tool go build -o $outDir/apc-p15-tool-amd64.exe ./cmd/tool
$env:GOARCH = "amd64" $env:GOARCH = "amd64"
$env:GOOS = "windows" $env:GOOS = "windows"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-install-amd64.exe ./cmd/tool go build -o $outDir/apc-p15-install-amd64.exe ./cmd/tool
# Linux x64 # Linux x64
$env:GOARCH = "amd64" $env:GOARCH = "amd64"
$env:GOOS = "linux" $env:GOOS = "linux"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-tool-amd64 ./cmd/tool go build -o $outDir/apc-p15-tool-amd64 ./cmd/tool
$env:GOARCH = "amd64" $env:GOARCH = "amd64"
$env:GOOS = "linux" $env:GOOS = "linux"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-install-amd64 ./cmd/install_only go build -o $outDir/apc-p15-install-amd64 ./cmd/install_only
# Linux arm64 # Linux arm64
$env:GOARCH = "arm64" $env:GOARCH = "arm64"
$env:GOOS = "linux" $env:GOOS = "linux"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-tool-arm64 ./cmd/tool go build -o $outDir/apc-p15-tool-arm64 ./cmd/tool
$env:GOARCH = "arm64" $env:GOARCH = "arm64"
$env:GOOS = "linux" $env:GOOS = "linux"
$env:CGO_ENABLED = 0
go build -o $outDir/apc-p15-install-arm64 ./cmd/install_only go build -o $outDir/apc-p15-install-arm64 ./cmd/install_only