whereabouts/hack/build-go.sh
Miguel Duarte Barroso ac7507e5bb ip-reconciler: add new binary
Fow now, we only read the kubeconfig file, which is specified via
the cmd line - as its only argument.

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
2021-07-21 17:36:34 +02:00

11 lines
441 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
cmd=whereabouts
eval $(go env | grep -e "GOHOSTOS" -e "GOHOSTARCH")
GOOS=${GOOS:-${GOHOSTOS}}
GOARCH=${GOARCH:-${GOHOSTARCH}}
GOFLAGS=${GOFLAGS:-}
GLDFLAGS=${GLDFLAGS:-}
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o bin/${cmd} cmd/${cmd}.go
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o bin/ip-reconciler cmd/reconciler/*.go