-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.bat
More file actions
30 lines (24 loc) · 765 Bytes
/
build.bat
File metadata and controls
30 lines (24 loc) · 765 Bytes
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
@echo off
SET VERSION=1.1.0
REM Create the version directory under dist
mkdir dist\%VERSION%
REM Build for Windows 64 bit
SET GOOS=windows
SET GOARCH=amd64
go build -ldflags="-s -w" -o dist\%VERSION%\shared2-%VERSION%-windows-amd64.exe
REM Build for Windows 32 bit
SET GOOS=windows
SET GOARCH=386
go build -ldflags="-s -w" -o dist\%VERSION%\shared2-%VERSION%-windows-386.exe
REM Build for Mac
SET GOOS=darwin
SET GOARCH=amd64
go build -ldflags="-s -w" -o dist\%VERSION%\shared2-%VERSION%-darwin-amd64
REM Build for Linux amd64
SET GOOS=linux
SET GOARCH=amd64
go build -ldflags="-s -w" -o dist\%VERSION%\shared2-%VERSION%-linux-amd64
REM Build for Linux arm
SET GOOS=linux
SET GOARCH=arm
go build -ldflags="-s -w" -o dist\%VERSION%\shared2-%VERSION%-linux-arm