diff --git a/hack/build-go.sh b/hack/build-go.sh index 6f8a1111b..e7f9ced83 100755 --- a/hack/build-go.sh +++ b/hack/build-go.sh @@ -32,7 +32,7 @@ fi mkdir -p ${BIN_PATH} -CGO_ENABLED=1 +CGO_ENABLED=${CGO_ENABLED:-1} if [[ ${WHAT} == "manager" ]]; then @@ -41,4 +41,4 @@ CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ld else echo "Building ${REPO}/cmd/${WHAT} (${VERSION_OVERRIDE})" CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS} -s -w" -o ${BIN_PATH}/${WHAT} ${REPO}/cmd/${WHAT} -fi \ No newline at end of file +fi