Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit a66d312

Browse files
committed
[tool] add build tool
1 parent 9a966c9 commit a66d312

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
release

build.bat

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@echo off
2+
echo ===========================
3+
echo = Go Cross Compile Script =
4+
echo = by Kevin =
5+
echo ===========================
6+
7+
echo -^> Removing old files
8+
del /s /Q release > nul
9+
10+
SET CGO_ENABLED=0
11+
echo -^> Compiling AMD64
12+
SET GOARCH=amd64
13+
14+
SET GOOS=windows
15+
echo --^> Compiling Windows
16+
go build -o release\fgit-windows-amd64.exe fgit.go
17+
SET GOOS=darwin
18+
echo --^> Compiling Darwin
19+
go build -o release\fgit-darwin-amd64 fgit.go
20+
SET GOOS=linux
21+
echo --^> Compiling Linux
22+
go build -o release\fgit-linux-amd64 fgit.go
23+
24+
SET GOARCH=386
25+
echo -^> Compiling 386
26+
SET GOOS=windows
27+
echo --^> Compiling Windows
28+
go build -o release\fgit-windows-386.exe fgit.go
29+
SET GOOS=linux
30+
echo --^> Compiling Linux
31+
go build -o release\fgit-linux-386 fgit.go
32+
33+
34+
SET GOARCH=arm
35+
echo -^> Compiling ARM
36+
SET GOOS=linux
37+
echo --^> Compiling Linux
38+
go build -o release\fgit-linux-arm fgit.go
39+
40+
SET GOARCH=arm64
41+
echo -^> Compiling ARM64
42+
SET GOOS=linux
43+
echo --^> Compiling Linux
44+
go build -o release\fgit-linux-arm64 fgit.go
45+
46+
pause

0 commit comments

Comments
 (0)