Skip to content

Commit

Permalink
Merge pull request #67 from manuelbuil/CGO_ENABLED
Browse files Browse the repository at this point in the history
Allow to modify CGO_ENABLED
  • Loading branch information
zshi-redhat authored Apr 13, 2021
2 parents 4c18b1b + 7d44401 commit bbc0397
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 bbc0397

Please sign in to comment.