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

Commit

Permalink
[tool] add build tool
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinZonda committed May 17, 2020
1 parent 9a966c9 commit a66d312
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
46 changes: 46 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@echo off
echo ===========================
echo = Go Cross Compile Script =
echo = by Kevin =
echo ===========================

echo -^> Removing old files
del /s /Q release > nul

SET CGO_ENABLED=0
echo -^> Compiling AMD64
SET GOARCH=amd64

SET GOOS=windows
echo --^> Compiling Windows
go build -o release\fgit-windows-amd64.exe fgit.go
SET GOOS=darwin
echo --^> Compiling Darwin
go build -o release\fgit-darwin-amd64 fgit.go
SET GOOS=linux
echo --^> Compiling Linux
go build -o release\fgit-linux-amd64 fgit.go

SET GOARCH=386
echo -^> Compiling 386
SET GOOS=windows
echo --^> Compiling Windows
go build -o release\fgit-windows-386.exe fgit.go
SET GOOS=linux
echo --^> Compiling Linux
go build -o release\fgit-linux-386 fgit.go


SET GOARCH=arm
echo -^> Compiling ARM
SET GOOS=linux
echo --^> Compiling Linux
go build -o release\fgit-linux-arm fgit.go

SET GOARCH=arm64
echo -^> Compiling ARM64
SET GOOS=linux
echo --^> Compiling Linux
go build -o release\fgit-linux-arm64 fgit.go

pause

0 comments on commit a66d312

Please sign in to comment.