2017-05-11 18:52:17 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Build a static binary for the host OS/ARCH
|
|
|
|
#
|
2017-05-09 12:38:23 -04:00
|
|
|
|
2017-05-11 18:52:17 -04:00
|
|
|
set -eu -o pipefail
|
2017-05-09 12:38:23 -04:00
|
|
|
|
2017-05-11 18:52:17 -04:00
|
|
|
source ./scripts/build/.variables
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
echo "Building statically linked $TARGET"
|
2017-05-11 18:52:17 -04:00
|
|
|
export CGO_ENABLED=0
|
|
|
|
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|
|
|
|
|
2017-07-18 08:17:17 -04:00
|
|
|
ln -sf "$(basename "${TARGET}")" build/docker
|