Skip to content

Commit

Permalink
remove unnecessary kube::golang::verify_go_version calls
Browse files Browse the repository at this point in the history
These scripts don't use go, GOPATH, etc.

They only need to cd to KUBE_ROOT and run git/grep. verify_go_version is wasting time.
  • Loading branch information
BenTheElder committed Sep 11, 2023
1 parent b7e3b9f commit 7ad0e45
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions hack/verify-pkg-names.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"

kube::golang::verify_go_version

cd "${KUBE_ROOT}"
if git --no-pager grep -E $'^(import |\t)[a-z]+[A-Z_][a-zA-Z]* "[^"]+"$' -- '**/*.go' ':(exclude)vendor/*' ':(exclude)**/*.pb.go'; then
echo "!!! Some package aliases break go conventions."
Expand Down
2 changes: 0 additions & 2 deletions hack/verify-prerelease-lifecycle-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"

kube::golang::verify_go_version

cd "${KUBE_ROOT}"
if git --no-pager grep -L '// +k8s:prerelease-lifecycle-gen=true' -- 'staging/src/k8s.io/api/**/*beta*/doc.go'; then
echo "!!! Some beta packages doc.go do not include prerelease-lifecycle tags."
Expand Down

0 comments on commit 7ad0e45

Please sign in to comment.