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

Run "go mod vendor" in verify-gomod #9389

Merged
merged 2 commits into from
Jun 18, 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
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,6 @@ dns-controller-push:
gomod-prereqs:
(which bazel > /dev/null) || (echo "gomod requires that bazel is installed"; exit 1)

.PHONY: dep-ensure
dep-ensure:
echo "'make dep-ensure' has been replaced by 'make gomod'"
exit 1

.PHONY: gomod
gomod: gomod-prereqs
GO111MODULE=on go mod vendor
Expand Down Expand Up @@ -509,7 +504,7 @@ verify-gofmt:

.PHONY: verify-gomod
verify-gomod:
hack/verify-gomod
hack/verify-gomod.sh

.PHONY: verify-packages
verify-packages: ${BINDATA_TARGETS}
Expand Down Expand Up @@ -569,7 +564,7 @@ ci: govet verify-gofmt verify-generate verify-gomod verify-goimports verify-boil
# verify-gofmt: uses bazel, covered by pull-kops-verify
# govet needs to be after verify-goimports because it generates bindata.go
.PHONY: travis-ci
travis-ci: verify-generate verify-gomod verify-goimports govet verify-boilerplate verify-bazel verify-misspelling verify-shellcheck verify-bindata | verify-gendocs verify-packages verify-apimachinery
travis-ci: verify-generate verify-goimports govet verify-boilerplate verify-bazel verify-misspelling verify-shellcheck verify-bindata | verify-gendocs verify-packages verify-apimachinery
echo "Done!"

.PHONY: pr
Expand Down
2 changes: 2 additions & 0 deletions hack/verify-gomod → hack/verify-gomod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ set -o pipefail

cd "${KOPS_ROOT}"

make gomod

changes=$(git status --porcelain || true)
if [ -n "${changes}" ]; then
echo "ERROR: go modules are not up to date; please run: go mod tidy"
Expand Down