mirror of
https://github.com/tenox7/wrp.git
synced 2024-10-31 21:07:41 +00:00
fixes for ps build
This commit is contained in:
parent
ee26c40eb3
commit
b313e703fb
15
make.ps1
15
make.ps1
@ -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"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user