mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 22:30:22 -04:00
24 lines
439 B
Bash
Executable file
24 lines
439 B
Bash
Executable file
#!/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
|
|
TARGET="build/docker-$GOOS-$GOARCH"
|
|
|
|
echo "Generating windows resources"
|
|
go generate ./cli/winresources
|
|
|
|
echo "Building $TARGET"
|
|
# TODO: -tags pkcs11
|
|
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|