-
Notifications
You must be signed in to change notification settings - Fork 0
/
goBuildWin.bat
44 lines (41 loc) · 976 Bytes
/
goBuildWin.bat
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
42
43
44
@echo off
color 0d
echo =================================
echo ==========Build Linux ======
echo =================================
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
echo now the CGO_ENABLED:
go env CGO_ENABLED
echo now the GOOS:
go env GOOS
echo now the GOARCH:
go env GOARCH
go build -o bin/go-gateway-linux main.go
echo =================================
echo ==========Build Mac ======
echo =================================
SET CGO_ENABLED=0
SET GOOS=darwin
SET GOARCH=amd64
echo now the CGO_ENABLED:
go env CGO_ENABLED
echo now the GOOS:
go env GOOS
echo now the GOARCH:
go env GOARCH
go build -o bin/go-gateway-mac main.go
echo =================================
echo ==========Build Windows ======
echo =================================
SET CGO_ENABLED=1
SET GOOS=windows
SET GOARCH=amd64
echo now the CGO_ENABLED:
go env CGO_ENABLED
echo now the GOOS:
go env GOOS
echo now the GOARCH:
go env GOARCH
go build -o bin/go-gateway-win.exe main.go