2017-05-11 18:52:17 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Build a dynamically linked binary for the host OS/ARCH
|
|
|
|
#
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
source ./scripts/build/.variables
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
echo "Building dynamically linked $TARGET"
|
2017-05-11 18:52:17 -04:00
|
|
|
export CGO_ENABLED=1
|
2018-07-30 05:34:01 -04:00
|
|
|
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
|
2017-05-11 18:52:17 -04:00
|
|
|
|
2017-07-18 08:17:17 -04:00
|
|
|
ln -sf "$(basename "${TARGET}")" build/docker
|