File tree 4 files changed +12
-14
lines changed
4 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ KUBE_GOLDFLAGS := $(GOLDFLAGS)
54
54
KUBE_GOGCFLAGS = $(GOGCFLAGS )
55
55
56
56
# 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 )
58
58
KUBE_FASTBUILD := $(KUBE_FASTBUILD )
59
59
60
60
# This controls the verbosity of the build. Higher numbers mean more output.
@@ -121,7 +121,6 @@ verify:
121
121
else
122
122
verify : verify_generated_files
123
123
KUBE_VERIFY_GIT_BRANCH=$(BRANCH ) hack/make-rules/verify.sh -v
124
- hack/make-rules/vet.sh
125
124
endif
126
125
127
126
define UPDATE_HELP_INFO
@@ -340,8 +339,8 @@ ifeq ($(PRINT_HELP),y)
340
339
vet :
341
340
@echo " $$ VET_HELP_INFO"
342
341
else
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 )
345
344
endif
346
345
347
346
define RELEASE_HELP_INFO
@@ -361,7 +360,7 @@ endif
361
360
362
361
define RELEASE_SKIP_TESTS_HELP_INFO
363
362
# Build a release, but skip tests
364
- #
363
+ #
365
364
# Args:
366
365
# KUBE_RELEASE_RUN_TESTS: Whether to run tests. Set to 'y' to run tests anyways.
367
366
# 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"
25
25
EXCLUDED_PATTERNS=(
26
26
" verify-all.sh" # this script calls the make rule and would cause a loop
27
27
" 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
29
28
" verify-test-owners.sh" # TODO(rmmh): figure out how to avoid endless conflicts
30
29
" verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
31
30
)
Original file line number Diff line number Diff line change @@ -23,9 +23,16 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
23
23
24
24
cd " ${KUBE_ROOT} "
25
25
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
+
26
34
# This is required before we run govet for the results to be correct.
27
35
# See https://github.com/golang/go/issues/16086 for details.
28
- make generated_files
29
36
go install ./cmd/...
30
37
31
38
# Use eval to preserve embedded quoted strings.
@@ -46,5 +53,4 @@ if [[ ${#targets[@]} -eq 0 ]]; then
46
53
targets=$( go list -e ./... | egrep -v " /(third_party|vendor|staging|clientset_generated)/" )
47
54
fi
48
55
49
- set -x
50
56
go vet " ${goflags[@]: +${goflags[@]} } " ${targets[@]}
Original file line number Diff line number Diff line change @@ -28,10 +28,4 @@ if [[ "$#" -gt 0 ]]; then
28
28
ARGHELP=" WHAT='$@ '"
29
29
fi
30
30
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
37
31
make --no-print-directory -C " ${KUBE_ROOT} " vet WHAT=" $@ "
You can’t perform that action at this time.
0 commit comments