Files
docker-cli/scripts/build/binary
Sebastiaan van Stijn b2aa690b26 scripts/build/binary: remove pkcs11 build tag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 15:24:49 +01:00

26 lines
616 B
Bash
Executable File

#!/usr/bin/env sh
#
# Build a static binary for the host OS/ARCH
#
set -eu
. ./scripts/build/.variables
echo "Building $GO_LINKMODE $(basename "${TARGET}")"
export GO111MODULE=auto
if [ "$(go env GOOS)" = "windows" ]; then
if [ ! -x "$(command -v goversioninfo)" ]; then
>&2 echo "goversioninfo not found, skipping manifesting binary"
else
./scripts/build/mkversioninfo
(set -x ; go generate -v "${SOURCE}")
fi
fi
(set -x ; go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" -ldflags "${GO_LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}")
ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker"