2016-11-01 13:29:01 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
. script/bootstrap
|
|
|
|
|
|
|
|
mkdir -p bin
|
|
|
|
bindir="$PWD"/bin
|
|
|
|
scriptdir="$PWD"/script
|
|
|
|
|
|
|
|
# We have a few binaries that we want to build, so let's put them into bin/
|
|
|
|
|
|
|
|
version=$(git rev-parse HEAD)
|
|
|
|
describe=$(git describe --tags --always --dirty)
|
|
|
|
|
|
|
|
export GOPATH="$PWD/.gopath"
|
2016-11-01 14:11:39 +03:00
|
|
|
cd .gopath/src/github.com/outbrain/orchestrator-agent
|
2016-11-01 13:29:01 +03:00
|
|
|
|
|
|
|
# We put the binaries directly into the bindir, because we have no need for shim wrappers
|
|
|
|
go build -o "$bindir/orchestrator-agent" -ldflags "-X main.AppVersion=${version} -X main.BuildDescribe=${describe}" ./go/cmd/orchestrator-agent/main.go
|