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
|
2020-02-27 09:34:23 -05:00
|
|
|
TARGET="build/docker-$GOOS-$GOARCH.exe"
|
2017-05-12 11:30:30 -04:00
|
|
|
|
2017-05-15 17:59:51 -04:00
|
|
|
echo "Generating windows resources"
|
|
|
|
go generate ./cli/winresources
|
|
|
|
|
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}"
|