Skip to content

Commit

Permalink
Allow to modify CGO_ENABLED
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <[email protected]>
  • Loading branch information
manuelbuil committed Feb 16, 2021
1 parent d78c86e commit 7d44401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fi

mkdir -p ${BIN_PATH}

CGO_ENABLED=1
CGO_ENABLED=${CGO_ENABLED:-1}


if [[ ${WHAT} == "manager" ]]; then
Expand All @@ -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
fi

0 comments on commit 7d44401

Please sign in to comment.