Fix verify-vendor script to check all go.mod and go.sum files
This commit is contained in:
		| @@ -62,15 +62,17 @@ popd > /dev/null 2>&1 | |||||||
| ret=0 | ret=0 | ||||||
|  |  | ||||||
| pushd "${KUBE_ROOT}" > /dev/null 2>&1 | pushd "${KUBE_ROOT}" > /dev/null 2>&1 | ||||||
|   # Test for diffs |   # Test for diffs in go.mod / go.sum / go.work | ||||||
|   if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' go.mod "${_kubetmp}/go.mod")"; then |   for file in $(git ls-files -cmo --exclude-standard -- ':!:vendor/*' ':(glob)**/go.mod' ':(glob)**/go.sum' ':(glob)**/go.work'); do | ||||||
|     echo "Your go.mod file is different:" >&2 |     if ! _out="$(diff -Naupr "${file}" "${_kubetmp}/${file}")"; then | ||||||
|     echo "${_out}" >&2 |       echo "Your ${file} file is different:" >&2 | ||||||
|     echo "Vendor Verify failed." >&2 |       echo "${_out}" >&2 | ||||||
|     echo "If you're seeing this locally, run the below command to fix your go.mod:" >&2 |       echo "Vendor Verify failed." >&2 | ||||||
|     echo "hack/update-vendor.sh" >&2 |       echo "If you're seeing this locally, run the below command to fix this:" >&2 | ||||||
|     ret=1 |       echo "hack/update-vendor.sh" >&2 | ||||||
|   fi |       ret=1 | ||||||
|  |     fi | ||||||
|  |   done | ||||||
|  |  | ||||||
|   if ! _out="$(diff -Naupr -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then |   if ! _out="$(diff -Naupr -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then | ||||||
|     echo "Your vendored results are different:" >&2 |     echo "Your vendored results are different:" >&2 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jordan Liggitt
					Jordan Liggitt