Created
April 13, 2014 02:14
-
-
Save masahide/10566044 to your computer and use it in GitHub Desktop.
Go言語 drone.ioで自動クロスコンパイル CI環境 #golang ref: http://qiita.com/yamasaki-masahide/items/b4348388267a703b4de5
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
pkg/os/error_unix.go:11: isExist redeclared in this block | |
previous declaration at pkg/os/error_posix.go:11 |
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
export GOROOT=~/go | |
export PATH=$GOROOT/bin:$PATH | |
### go 1.2.1をダウンロードして展開 | |
wget -q https://go.googlecode.com/files/go1.2.1.linux-amd64.tar.gz | |
tar -C ~/ -xzf go1.2.1.linux-amd64.tar.gz | |
### クロスコンパイルの準備 | |
pushd ~/go/src | |
# windows 64bit | |
GOOS=windows GOARCH=amd64 ./make.bash --no-clean 2> /dev/null 1> /dev/null | |
# MacOS 64bit | |
GOOS=darwin GOARCH=amd64 ./make.bash --no-clean 2> /dev/null 1> /dev/null | |
popd | |
### go get で get & build (getはbuildも実行されるみたいですね) | |
GOOS=windows GOARCH=amd64 go get ./... | |
GOOS=darwin GOARCH=amd64 go get ./... | |
# アーカイブするために作成したバイナリをコピーする | |
mkdir artifacts | |
cp -r `go env GOPATH`/bin artifacts |
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
artifacts/bin/*/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment