mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Make update-netparse-cve use ls-files
This commit is contained in:
parent
822745512d
commit
6a49eae422
@ -45,22 +45,18 @@ popd >/dev/null
|
||||
|
||||
cd "${KUBE_ROOT}"
|
||||
|
||||
find_files() {
|
||||
find . -not \( \
|
||||
\( \
|
||||
-wholename './output' \
|
||||
-o -wholename './.git' \
|
||||
-o -wholename './_output' \
|
||||
-o -wholename './_gopath' \
|
||||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
-o -wholename './staging/src/k8s.io/client-go/*vendor/*' \
|
||||
\) -prune \
|
||||
\) -name '*.go'
|
||||
function git_find() {
|
||||
# Similar to find but faster and easier to understand. We want to include
|
||||
# modified and untracked files because this might be running against code
|
||||
# which is not tracked by git yet.
|
||||
git ls-files -cmo --exclude-standard \
|
||||
':!:vendor/*' `# catches vendor/...` \
|
||||
':!:*/vendor/*' `# catches any subdir/vendor/...` \
|
||||
':!:third_party/*' `# catches third_party/...` \
|
||||
':!:*/third_party/*' `# catches third_party/...` \
|
||||
':(glob)**/*.go' \
|
||||
"$@"
|
||||
}
|
||||
|
||||
# replace net.ParseIP() and netParseIPCDR
|
||||
find_files | xargs sloppy-netparser
|
||||
|
||||
git_find -z | xargs -0 sloppy-netparser
|
||||
|
Loading…
Reference in New Issue
Block a user