fixes for ps build

This commit is contained in:
Antoni Sawicki 2019-07-16 23:30:40 -07:00
parent ee26c40eb3
commit b313e703fb

View File

@ -1,9 +1,20 @@
param (
[switch]$clean = $false
)
$env:GOARCH="amd64" $env:GOARCH="amd64"
foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) { foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) {
$env:GOOS=$os $env:GOOS=$os
Invoke-Expression "& go build -a -o wrp-$(if ($os -eq "windows") {$os="windows.exe"})$os wrp.go" $o="wrp-$(if ($os -eq "windows") {$os="windows.exe"})$os"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}
} }
$env:GOARCH="arm" $env:GOARCH="arm"
$env:GOOS="linux" $env:GOOS="linux"
Invoke-Expression "& go build -a -o wrp-linux-rpi wrp.go" $o="wrp-linux-rpi"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}