Skip to content

Commit

Permalink
Added cross compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
tobychui committed Dec 30, 2022
1 parent 9a32125 commit df4f234
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ config.json

# Dependency directories (remove the comment below to include it)
# vendor/
dist/
23 changes: 23 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# /bin/sh
mkdir dist/
echo "Building darwin"
GOOS=darwin GOARCH=amd64 go build
mv utm dist/utm_darwin_amd64

echo "Building linux"
#GOOS=linux GOARCH=386 go build
#mv aroz_online build/aroz_online_linux_i386
GOOS=linux GOARCH=amd64 go build
mv utm dist/utm_linux_amd64
GOOS=linux GOARCH=arm GOARM=6 go build
mv utm dist/utm_linux_arm
GOOS=linux GOARCH=arm GOARM=7 go build
mv utm dist/utm_linux_armv7
GOOS=linux GOARCH=arm64 go build
mv utm dist/utm_linux_arm64

echo "Building windows"
GOOS=windows GOARCH=amd64 go build
mv utm dist/utm_windows_amd64.exe

echo "OK"

0 comments on commit df4f234

Please sign in to comment.