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

Commit be24a81

Browse files
authored
[script] use -ldflags="-s -w"
1 parent 5ec2665 commit be24a81

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ SET GOARCH=amd64
1313

1414
SET GOOS=windows
1515
echo --^> Compiling Windows
16-
go build -o release\fgit-windows-amd64.exe fgit.go
16+
go build -ldflags="-s -w" -o release\fgit-windows-amd64.exe fgit.go
1717
SET GOOS=darwin
1818
echo --^> Compiling Darwin
19-
go build -o release\fgit-darwin-amd64 fgit.go
19+
go build -ldflags="-s -w" -o release\fgit-darwin-amd64 fgit.go
2020
SET GOOS=linux
2121
echo --^> Compiling Linux
22-
go build -o release\fgit-linux-amd64 fgit.go
22+
go build -ldflags="-s -w" -o release\fgit-linux-amd64 fgit.go
2323

2424
SET GOARCH=386
2525
echo -^> Compiling 386
2626
SET GOOS=windows
2727
echo --^> Compiling Windows
28-
go build -o release\fgit-windows-386.exe fgit.go
28+
go build -ldflags="-s -w" -o release\fgit-windows-386.exe fgit.go
2929
SET GOOS=linux
3030
echo --^> Compiling Linux
31-
go build -o release\fgit-linux-386 fgit.go
31+
go build -ldflags="-s -w" -o release\fgit-linux-386 fgit.go
3232

3333

3434
SET GOARCH=arm
3535
echo -^> Compiling ARM
3636
SET GOOS=linux
3737
echo --^> Compiling Linux
38-
go build -o release\fgit-linux-arm fgit.go
38+
go build -ldflags="-s -w" -o release\fgit-linux-arm fgit.go
3939

4040
SET GOARCH=arm64
4141
echo -^> Compiling ARM64
4242
SET GOOS=linux
4343
echo --^> Compiling Linux
44-
go build -o release\fgit-linux-arm64 fgit.go
44+
go build -ldflags="-s -w" -o release\fgit-linux-arm64 fgit.go
4545

46-
pause
46+
pause

0 commit comments

Comments
 (0)