Run "go mod vendor" in verify-gomod

This will actually catch vendoring issues
This commit is contained in:
Peter Rifel 2020-06-17 21:39:08 -05:00
parent 121c0aaa31
commit a1111002a3
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
2 changed files with 3 additions and 6 deletions

View File

@ -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
@ -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}

View File

@ -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"