2016-10-26 17:55:37 +00: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"
|
|
|
|
cd .gopath/src/github.com/github/gh-ost
|
|
|
|
|
2016-10-27 09:58:56 +00:00
|
|
|
# We put the binaries directly into the bindir, because we have no need for shim wrappers
|
2021-05-25 11:22:28 +00:00
|
|
|
# TODO: remove GO111MODULE once gh-ost uses Go modules
|
|
|
|
GO111MODULE=off go build -o "$bindir/gh-ost" -ldflags "-X main.AppVersion=${version} -X main.BuildDescribe=${describe}" ./go/cmd/gh-ost/main.go
|