File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ mods=$( (set -x; curl --silent --show-error --fail "https://raw.githubuserconten
5555 sed -n ' s|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
5656 ) || die " failed to determine Kubernetes staging modules"
5757for mod in $mods ; do
58+ if ! (env GO111MODULE=on go mod graph) | grep " $mod @" > /dev/null; then
59+ echo " Kubernetes module $mod is not used, skipping"
60+ # Remove the module from go.mod "replace" that was added by an older version of this script.
61+ (set -x; env GO111MODULE=on go mod edit " -dropreplace=$mod " ) || die " 'go mod edit' failed"
62+ continue
63+ fi
5864 # The presence of a potentially incomplete go.mod file affects this command,
5965 # so move elsewhere.
6066 modinfo=$( set -x; cd /; env GO111MODULE=on go mod download -json " $mod @kubernetes-${k8s} " ) ||
You can’t perform that action at this time.
0 commit comments