2017-05-12 11:30:30 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Build a windows binary from linux
|
|
|
|
#
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
source ./scripts/build/.variables
|
|
|
|
|
|
|
|
export CC=x86_64-w64-mingw32-gcc
|
|
|
|
export CGO_ENABLED=1
|
|
|
|
export GOOS=windows
|
|
|
|
export GOARCH=amd64
|
|
|
|
|
|
|
|
# Override TARGET
|
2017-05-14 13:24:10 -04:00
|
|
|
TARGET="build/docker-$GOOS-$GOARCH"
|
2017-05-12 11:30:30 -04:00
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
echo "Building $TARGET"
|
2017-05-12 11:30:30 -04:00
|
|
|
# TODO: -tags pkcs11
|
|
|
|
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|