Consolidate scripts into k8s-traditional hack dir.

This commit is contained in:
monopole
2021-05-24 17:08:54 -07:00
parent 501748192b
commit 172adc404f
13 changed files with 23 additions and 14 deletions

22
hack/check-go-mod.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
set -x
set -e
# verify all modules pass validation
for i in $(find . -name go.mod); do
pushd .
cd $(dirname $i);
go list -m -json all > /dev/null
go mod tidy -v
popd
done
# Need better check. This is repeated git diff check
# more pain than benefit for most people 25Apr2020
## verify no changes to go.mods -- these should be part of the PR
# find . -name go.sum | xargs git checkout --
# git add .
# git diff-index HEAD --exit-code