diff --git a/hack/gobuild.sh b/hack/gobuild.sh index 8b848f9a7acd01d7269e4d48d94f53ecd24a17ef..b082ab498c0726b83e6aec33108317a62694b137 100755 --- a/hack/gobuild.sh +++ b/hack/gobuild.sh @@ -36,8 +36,8 @@ OUTPUT_DIR=bin BUILDPATH=./${1:?"path to build"} OUT=${OUTPUT_DIR}/${1:?"output path"} -BUILD_GOOS=${GOOS:-linux} -BUILD_GOARCH=${GOARCH:-amd64} +BUILD_GOOS=${GOOS:-$(go env GOOS)} +BUILD_GOARCH=${GOARCH:-$(go env GOARCH)} GOBINARY=${GOBINARY:-go} LDFLAGS=$(kube::version::ldflags)