mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-22 10:31:21 +00:00
21 lines
490 B
PowerShell
21 lines
490 B
PowerShell
param (
|
|
[switch]$clean = $false
|
|
)
|
|
$env:GOARCH="amd64"
|
|
foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) {
|
|
$env:GOOS=$os
|
|
$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:GOOS="linux"
|
|
$o="wrp-linux-rpi"
|
|
Remove-Item -ErrorAction Ignore $o
|
|
if (!$clean) {
|
|
Invoke-Expression "& go build -a -o $o wrp.go"
|
|
}
|