diff --git a/Makefile b/Makefile index 694ff7f676..d7a91f57f5 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,9 @@ BAZEL_CONFIG?= API_OPTIONS?= GCFLAGS?= +# This can be removed when we upgrade to go 1.14 +export GOFLAGS=-mod=vendor + UPLOAD_CMD=$(KOPS_ROOT)/hack/upload # Unexport environment variables that can affect tests and are not used in builds @@ -448,7 +451,7 @@ gomod-prereqs: .PHONY: gomod gomod: gomod-prereqs - GO111MODULE=on go mod vendor + GO111MODULE=on GOFLAGS= go mod vendor # Switch weavemesh to use peer_name_hash - bazel rule-go doesn't support build tags yet rm vendor/github.com/weaveworks/mesh/peer_name_mac.go sed -i -e 's/peer_name_hash/!peer_name_mac/g' vendor/github.com/weaveworks/mesh/peer_name_hash.go diff --git a/hack/make-apimachinery.sh b/hack/make-apimachinery.sh index 106001710c..2d313e4ec7 100755 --- a/hack/make-apimachinery.sh +++ b/hack/make-apimachinery.sh @@ -30,6 +30,7 @@ mkdir -p "${WORK_DIR}/go/" cp -R "${GOPATH}/src/k8s.io/kops/vendor/" "${WORK_DIR}/go/src" unset GOBIN +unset GOFLAGS env GOBIN="${WORK_DIR}/go/bin" GOPATH="${WORK_DIR}/go/" go install -v k8s.io/code-generator/cmd/conversion-gen/ cp "${WORK_DIR}/go/bin/conversion-gen" "${GOPATH}/bin/"