mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-01-22 08:14:08 +00:00
add build script
This commit is contained in:
parent
d6bb512b3e
commit
65f0ee7504
2 changed files with 21 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -4,3 +4,6 @@
|
||||||
|
|
||||||
# ignore test_data folder
|
# ignore test_data folder
|
||||||
/_test_data
|
/_test_data
|
||||||
|
|
||||||
|
# build folder
|
||||||
|
/_out
|
||||||
|
|
18
build.ps1
Normal file
18
build.ps1
Normal 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
|
Loading…
Reference in a new issue