-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to dep 0.5.0, go 1.10.3 #1479
Conversation
Signed-off-by: Kevin Lingerfelt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌟 🐐 🏬 yayyy thank you for making this upgrade!
Removing my .dep
before running bin/dep
worked for me!
Signed-off-by: Kevin Lingerfelt <[email protected]>
bin/dep
Outdated
if [ "$version" != "$depversion" ]; then | ||
rm "$depbin" | ||
fi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could probably do this more easily--without relying on the output formatting of dep, for instance--by storing the $depversion in the $depbin (i think we do this for protoc in the api repo, for instance). I.e., if the version is encoded in the file name, there's no reason to discover what version the local file is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, that's a great point -- thanks. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took that approach in 54d9e78.
bin/dep
Outdated
depurl="${dep_base_url}dep-${os}-amd64${exe}" | ||
|
||
if [ -f "$depbin" ]; then | ||
version=$($depbin version | grep "^ version" | awk '{print $3}' | awk -F '-' '{print $1}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, code golf note:
grep "^ version" | awk '{print $3}' | ...
is better expressed as
awk '$1 ~ /^version$/ { print $3 }' | ...
Signed-off-by: Kevin Lingerfelt <[email protected]>
echo Actual digest of $depbin does not match expected digest. | ||
curl -L --silent --fail -o depbin "$depurl" | ||
sha=$(curl -L --silent --fail "${depurl}.sha256" | awk '{ print $1 }') | ||
(echo "$sha *depbin" | shasum -c -a 256 -p -s -) || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be $depbin
or perhaps it doesn't matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't be $depbin
since $depbin
is now an absolute path, and that won't work here in the tmp dir. So instead I'm using the filename "depbin" everywhere in tmp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This branch updates
bin/dep
to install dep v0.5.0 which was recently released. The new release includes golang/dep#1912, which substantially speeds up re-runningbin/dep ensure
.I'm also upgrading the repo from go 1.10.2 to 1.10.3 as part of this change. And I've modified the
bin/dep
script to pull checksums from the github release, so that we don't have to hardcode them in that script.