open-nomad/scripts/build-dev.sh
Michael Schurter 1f6090371b make bin creates a release binary for the host arch
make dev properly copies the binary into bin/ again.

make release still creates binaries for as many archs as possible.

Fixes #2407
2017-03-08 17:42:28 -08:00

20 lines
451 B
Bash
Executable file

#!/usr/bin/env bash
set -e
GIT_COMMIT="$(git rev-parse HEAD)"
GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)"
LDFLAG="main.GitCommit=${GIT_COMMIT}${GIT_DIRTY}"
TAGS="nomad_test"
if [[ $(uname) == "Linux" ]]; then
if pkg-config --exists lxc; then
TAGS="$TAGS lxc"
fi
fi
echo "--> Installing with tags: $TAGS"
go install -ldflags "-X $LDFLAG" -tags "${TAGS}"
echo "--> Copying to bin"
cp $GOPATH/bin/nomad bin/nomad