diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..fc48ca9 --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +buildpath=/tmp/gh-osc +target=gh-osc +timestamp=$(date "+%Y%m%d%H%M%S") +mkdir -p ${buildpath} +gobuild="go build -o $buildpath/$target go/cmd/gh-osc/main.go" + +echo "Building OS/X binary" +echo "GO15VENDOREXPERIMENT=1 GOOS=darwin GOARCH=amd64 $gobuild" | bash +(cd $buildpath && tar cfz ./gh-osc-binary-osx-${timestamp}.tar.gz $target) + +echo "Building linux binary" +echo "GO15VENDOREXPERIMENT=1 GOOS=linux GOARCH=amd64 $gobuild" | bash +(cd $buildpath && tar cfz ./gh-osc-binary-linux-${timestamp}.tar.gz $target) + +echo "Binaries found in:" +ls -1 $buildpath/gh-osc-binary*${timestamp}.tar.gz