Skip to content

Commit

Permalink
Merge pull request #4085 from brett-elliott/updatevendor-improvement
Browse files Browse the repository at this point in the history
Print out error when unable to download module
  • Loading branch information
k8s-ci-robot authored May 24, 2021
2 parents 5ab7792 + e1b7f62 commit fe5419d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cluster-autoscaler/hack/update-vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ rm -rf ${WORKDIR}

for MOD in "${MODS[@]}"; do
V=$(
go mod download -json "${MOD}@kubernetes-${VERSION}" |
sed -n 's|.*"Version": "\(.*\)".*|\1|p'
GOMOD="${MOD}@kubernetes-${VERSION}"
JSON=$(go mod download -json "${GOMOD}")
retval=$?
if [ $retval -ne 0 ]; then
echo "Error downloading module ${GOMOD}."
exit 1
fi
echo "${JSON}" | sed -n 's|.*"Version": "\(.*\)".*|\1|p'
)
go mod edit "-replace=${MOD}=${MOD}@${V}"
done
Expand Down

0 comments on commit fe5419d

Please sign in to comment.