6a5fa593fa
The dev build is far simpler than the release build, so move it to its own shell script. This simplifies the release build script slightly as well at the cost of duplicating the version/tag logic. Also don't even try to check for LXC if not running on Linux. I don't think we want to try to support cross-compiling LXC from non-Linux hosts.
17 lines
393 B
Bash
Executable file
17 lines
393 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}"
|