Merge pull request #76149 from liggitt/pin-fixup

Make pin-dependency.sh work with things other than docker
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-04 13:21:30 -07:00 committed by GitHub
commit 312c8ccb69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -56,10 +56,10 @@ fi
# Add the require directive
echo "Running: go get ${dep}@${sha}"
go get "${dep}@${sha}"
go get -d "${dep}@${sha}"
# Find the resolved version
rev=$(go mod edit -json | jq -r '.Require[] | select(.Path == "github.com/docker/docker") | .Version')
rev=$(go mod edit -json | jq -r ".Require[] | select(.Path == \"${dep}\") | .Version")
echo "Resolved to ${dep}@${rev}"
# Add the replace directive