File tree Expand file tree Collapse file tree 4 files changed +12
-14
lines changed
Expand file tree Collapse file tree 4 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ KUBE_GOLDFLAGS := $(GOLDFLAGS)
5454KUBE_GOGCFLAGS = $(GOGCFLAGS )
5555
5656# Extra options for the release or quick-release options:
57- KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS )
57+ KUBE_RELEASE_RUN_TESTS := $(KUBE_RELEASE_RUN_TESTS )
5858KUBE_FASTBUILD := $(KUBE_FASTBUILD )
5959
6060# This controls the verbosity of the build. Higher numbers mean more output.
@@ -121,7 +121,6 @@ verify:
121121else
122122verify : verify_generated_files
123123 KUBE_VERIFY_GIT_BRANCH=$(BRANCH ) hack/make-rules/verify.sh -v
124- hack/make-rules/vet.sh
125124endif
126125
127126define UPDATE_HELP_INFO
@@ -340,8 +339,8 @@ ifeq ($(PRINT_HELP),y)
340339vet :
341340 @echo " $$ VET_HELP_INFO"
342341else
343- vet :
344- hack/make-rules/vet.sh $(WHAT )
342+ vet : generated_files
343+ CALLED_FROM_MAIN_MAKEFILE=1 hack/make-rules/vet.sh $(WHAT )
345344endif
346345
347346define RELEASE_HELP_INFO
@@ -361,7 +360,7 @@ endif
361360
362361define RELEASE_SKIP_TESTS_HELP_INFO
363362# Build a release, but skip tests
364- #
363+ #
365364# Args:
366365# KUBE_RELEASE_RUN_TESTS: Whether to run tests. Set to 'y' to run tests anyways.
367366# KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'true' to do so.
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
2525EXCLUDED_PATTERNS=(
2626 " verify-all.sh" # this script calls the make rule and would cause a loop
2727 " verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage
28- " verify-govet.sh" # it has a separate make vet target
2928 " verify-test-owners.sh" # TODO(rmmh): figure out how to avoid endless conflicts
3029 " verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
3130 )
Original file line number Diff line number Diff line change @@ -23,9 +23,16 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
2323
2424cd " ${KUBE_ROOT} "
2525
26+ # If called directly, exit.
27+ if [[ " ${CALLED_FROM_MAIN_MAKEFILE:- " " } " == " " ]]; then
28+ echo " ERROR: $0 should not be run directly." >&2
29+ echo >&2
30+ echo " Please run this command using \" make vet\" "
31+ exit 1
32+ fi
33+
2634# This is required before we run govet for the results to be correct.
2735# See https://github.com/golang/go/issues/16086 for details.
28- make generated_files
2936go install ./cmd/...
3037
3138# Use eval to preserve embedded quoted strings.
@@ -46,5 +53,4 @@ if [[ ${#targets[@]} -eq 0 ]]; then
4653 targets=$( go list -e ./... | egrep -v " /(third_party|vendor|staging|clientset_generated)/" )
4754fi
4855
49- set -x
5056go vet " ${goflags[@]: +${goflags[@]} } " ${targets[@]}
Original file line number Diff line number Diff line change @@ -28,10 +28,4 @@ if [[ "$#" -gt 0 ]]; then
2828 ARGHELP=" WHAT='$@ '"
2929fi
3030
31- echo " NOTE: $0 has been replaced by 'make vet'"
32- echo
33- echo " The equivalent of this invocation is: "
34- echo " make vet ${ARGHELP} "
35- echo
36- echo
3731make --no-print-directory -C " ${KUBE_ROOT} " vet WHAT=" $@ "
You can’t perform that action at this time.
0 commit comments