File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,14 @@ export CGO_ENABLED=0
10
10
export GO111MODULE=on
11
11
12
12
build () {
13
- local GOOS=${1:- linux}
14
- local GOARCH=${2:- amd64}
15
- local TARGET=build/${3:- wrest} -$GOOS -$GOARCH
16
- echo building for $GOOS /$GOARCH
17
- go build -ldflags=" -s -w" -o $TARGET main.go
18
- if [ x" $GOOS " = x" windows" ]; then
19
- mv $TARGET " ${TARGET} .exe"
20
- else
21
- chmod +x $TARGET
13
+ local os=${2:- linux}
14
+ local arch=${3:- amd64}
15
+ local sbin=build/${1:- bin} -$os -$arch
16
+ if [ x" $os " = x" windows" ]; then
17
+ sbin=" ${sbin} .exe"
22
18
fi
19
+ echo building for $os /$arch
20
+ GOOS=$os GOARCH=$arch go build -ldflags=" -s -w" -o $sbin main.go
23
21
}
24
22
25
23
# ###################################################################
@@ -48,8 +46,8 @@ if [ -f webview/public/browser/index.html ]; then
48
46
cp -av webview/public/browser/. public/
49
47
fi
50
48
51
- build linux amd64
52
- build windows amd64
49
+ build wrest linux amd64
50
+ build wrest windows amd64
53
51
54
52
# ###################################################################
55
53
# package for linux
You can’t perform that action at this time.
0 commit comments