Skip to content

Commit

Permalink
hack/build-go.sh: use -mod=vendor when building
Browse files Browse the repository at this point in the history
Avoids redownloading every dependency (especially with docker/podman where
there's no local cache)

Signed-off-by: Antonio Murdaca <[email protected]>
  • Loading branch information
runcom committed Oct 31, 2019
1 parent 8ccb177 commit 8f922f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ if [[ $WHAT == "machine-config-controller" ]]; then
fi

echo "Building ${REPO}/cmd/${WHAT} (${VERSION_OVERRIDE}, ${HASH})"
CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build -tags="${GOFLAGS}" -ldflags "${GLDFLAGS} -s -w" -o ${BIN_PATH}/${WHAT} ${REPO}/cmd/${WHAT}
CGO_ENABLED=${CGO_ENABLED} GOOS=${GOOS} GOARCH=${GOARCH} go build -mod=vendor -tags="${GOFLAGS}" -ldflags "${GLDFLAGS} -s -w" -o ${BIN_PATH}/${WHAT} ${REPO}/cmd/${WHAT}

0 comments on commit 8f922f9

Please sign in to comment.