-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build script (cross-compile from Linux host)
- Loading branch information
1 parent
0f65b5b
commit cb909b6
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
mkdir -p ./build/amd64 | ||
mkdir -p ./build/i386 | ||
|
||
export GOOS=linux | ||
export GOARCH=amd64 | ||
go build | ||
mv ./boi ./build/amd64/boi | ||
export GOARCH=386 | ||
go build | ||
mv ./boi ./build/i386/boi | ||
|
||
export GOOS=windows | ||
export GOARCH=amd64 | ||
go build | ||
mv ./boi.exe ./build/amd64/boi.exe | ||
export GOARCH=386 | ||
go build | ||
mv ./boi.exe ./build/i386/boi.exe | ||
|