File tree 1 file changed +6
-0
lines changed
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
55
55
sed -n ' s|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
56
56
) || die " failed to determine Kubernetes staging modules"
57
57
for 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
58
64
# The presence of a potentially incomplete go.mod file affects this command,
59
65
# so move elsewhere.
60
66
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