mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
15 lines
295 B
Text
15 lines
295 B
Text
![]() |
#!/usr/bin/env bash
|
||
|
#
|
||
|
# Build a static binary for the host OS/ARCH
|
||
|
#
|
||
|
|
||
|
set -eu -o pipefail
|
||
|
|
||
|
source ./scripts/build/.variables
|
||
|
|
||
|
echo "Building statically linked $TARGET"
|
||
|
export CGO_ENABLED=0
|
||
|
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|
||
|
|
||
|
ln -sf "$(basename "${TARGET}")" build/docker
|