add build script

This commit is contained in:
Greg T. Wallace 2024-02-02 18:35:22 -05:00
parent d6bb512b3e
commit 65f0ee7504
2 changed files with 21 additions and 0 deletions

3
.gitignore vendored
View file

@ -4,3 +4,6 @@
# ignore test_data folder # ignore test_data folder
/_test_data /_test_data
# build folder
/_out

18
build.ps1 Normal file
View file

@ -0,0 +1,18 @@
# Parent dir is root
$scriptDir = Get-Location
$outDir = Join-Path -Path $scriptDir -ChildPath "/_out"
# Windows x64
$env:GOARCH = "amd64"
$env:GOOS = "windows"
go build -o $outDir/apc-p15-tool-amd64.exe ./cmd/tool
# Linux x64
$env:GOARCH = "amd64"
$env:GOOS = "linux"
go build -o $outDir/apc-p15-tool-amd64 ./cmd/tool
# Linux x64 install only
$env:GOARCH = "amd64"
$env:GOOS = "linux"
go build -o $outDir/apc-p15-install-amd64 ./cmd/install_only