22 lines
576 B
Plaintext
22 lines
576 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
. script/bootstrap
|
||
|
|
||
|
mkdir -p bin
|
||
|
bindir="$PWD"/bin
|
||
|
libexecdir="$PWD"/libexec
|
||
|
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
|
||
|
|
||
|
# We put the binaries into libexec/ and then put the shim with the appropriate name into bin/
|
||
|
go build -o "$libexecdir/gh-ost" -ldflags "-X main.AppVersion=${version} -X main.BuildDescribe=${describe}" ./go/cmd/gh-ost/main.go
|