-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
41 lines (31 loc) · 1 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$version = $args[0]
$dir = "./build/v$version"
$linuxArm64Dir = $dir + "/IPNotify-linux-arm64-v" + $version
$linuxAmd64Dir = $dir + "/IPNotify-linux-amd64-v" + $version
$windowsArm64Dir = $dir + "/IPNotify-windows-arm64-v" + $version
$windowsAmd64Dir = $dir + "/IPNotify-windows-amd64-v" + $version
$linuxArm64Path = $linuxArm64Dir + "/IPNotify"
$linuxAmd64Path = $linuxAmd64Dir + "/IPNotify"
$windowsArm64Path = $windowsArm64Dir + "/IPNotify.exe"
$windowsAmd64Path = $windowsAmd64Dir + "/IPNotify.exe"
echo $linuxArm64Path
$env:GOOS="linux"
$env:GOARCH="arm64"
go build -o $linuxArm64Path .
echo $linuxAmd64Path
$env:GOOS="linux"
$env:GOARCH="amd64"
go build -o $linuxAmd64Path .
echo $windowsArm64Path
$env:GOOS="windows"
$env:GOARCH="arm64"
go build -o $windowsArm64Path .
echo $windowsAmd64Path
$env:GOOS="windows"
$env:GOARCH="amd64"
go build -o $windowsAmd64Path .
cp ./config.yaml $linuxArm64Dir
cp ./config.yaml $linuxAmd64Dir
cp ./config.yaml $windowsAmd64Dir
cp ./config.yaml $windowsArm64Dir
echo "Done"