Skip to content

Commit

Permalink
Introduce simple script for cross-compiling to different OS and arch
Browse files Browse the repository at this point in the history
Signed-off-by: ATechnoHazard <[email protected]>
  • Loading branch information
ATechnoHazard committed Jun 16, 2019
1 parent 242afaa commit 11f8a2d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions build_cross.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Build linux targets
echo "Building for linux"

echo "Building x86_64"
env GOOS=linux GOARCH=amd64 go build -o build/ginko_linux_x86_64

echo "Building x86"
env GOOS=linux GOARCH=386 go build -o build/ginko_linux_x86

echo "Building arm"
env GOOS=linux GOARCH=arm go build -o build/ginko_linux_arm

echo "Building arm64"
env GOOS=linux GOARCH=arm64 go build -o build/ginko_linux_arm64

# Build windows targets
echo
echo "Building for windows"

echo "Building x86_64"
env GOOS=windows GOARCH=amd64 go build -o build/ginko_win_x86_64.exe

echo "Building x86"
env GOOS=windows GOARCH=386 go build -o build/ginko_win_x86.exe

# Build mac targets
echo
echo "Building for MacOS"

echo "Building x86_64"
env GOOS=darwin GOARCH=amd64 go build -o build/ginko_darwin_x86_64

echo "Building x86"
env GOOS=darwin GOARCH=386 go build -o build/ginko_darwin_x86
1 change: 1 addition & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ BOT_API_KEY=
BOT_NAME=
OWNER_USERNAME=
OWNER_ID=
DATABASE_URI=
SUDO_USERS=

0 comments on commit 11f8a2d

Please sign in to comment.