Skip to content

Commit

Permalink
Add build script under mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
at15 committed Jan 15, 2016
1 parent ffc8be2 commit 32e8518
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

echo "build for OS X"

# FIXME: go build runtime: drawin/amd64 must be bootstrapped using make.bash
#GOOS=drawin GOARCH=amd64 go build -o Ayi.osx Ayi.go
#GOOS=drawin GOARCH=386 go build -o Ayi.osx Ayi.go
go build -o Ayi.osx Ayi.go

echo "build for windows"
GOOS=windows GOARCH=386 go build -o Ayi.exe Ayi.go
echo "build for linux"
GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o Ayi.linux Ayi.go

mv Ayi.osx build/osx/Ayi
mv Ayi.linux build/linux/Ayi
mv Ayi.exe build/win/Ayi.exe

tar -cvzf build/ayi.osx.tgz build/osx/Ayi
tar -cvzf build/ayi.linux.tgz build/linux/Ayi
zip build/ayi.win.zip build/win/Ayi.exe
2 changes: 2 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tgz
*.zip
1 change: 1 addition & 0 deletions build/linux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/osx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/win/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*

0 comments on commit 32e8518

Please sign in to comment.