adding build file
This commit is contained in:
parent
09046c8f6e
commit
1576119576
18
build.sh
Normal file
18
build.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user