Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -mod=vendor for most go commands #9396

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -461,7 +464,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
Expand Down
1 change: 1 addition & 0 deletions hack/make-apimachinery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down