Skip to content

Commit

Permalink
Merge pull request #9396 from rifelpet/modvendor
Browse files Browse the repository at this point in the history
Use -mod=vendor for most go commands
  • Loading branch information
k8s-ci-robot authored Jun 19, 2020
2 parents b5b544d + 2504ad1 commit d5e1bab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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 @@ -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
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

0 comments on commit d5e1bab

Please sign in to comment.