use a script to download premade binaries instead of compiling them - #3692
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test all |
|
/test pull-kcp-lint |
1 similar comment
|
/test pull-kcp-lint |
|
/test pull-kcp-lint |
|
/test pull-kcp-lint |
|
/test all |
|
/test all |
|
/retest |
1 similar comment
|
/retest |
|
/test all |
|
/test all |
I dont quite get this.
I Im a bit lost on how to update the checksums now? |
|
/retest |
|
controller-gen accidentally was left in a superposition where it was a Go module (those are not checksummed), but it still had checksums in the checksum file from my previous testing. I have now corrected it and now the checksums will be updated as described. |
|
I've made a number of changes now based on your feedback:
|
On-behalf-of: @SAP christoph.mewes@sap.com
|
/retest |
|
/lgtm lets try and see |
|
LGTM label has been added. DetailsGit tree hash: 6da73e24187c7d75236d156486052650f7717362 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjudeikis The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
Summary
This resurrects #3431, but better.
The main issue I could not solve in the previous PR was @embik's wish to have checksums being checked when downloading a tool. It would have been trivial to just record the checksum for the host's specific OS/arch combo, because that's the binary we just downloaded, BUT trouble arises when anyone wants to update a tool like golangci-lint: If all I can do is update the checksum for my own OS/arch combo, then everyone on other machines will suddenly run into issues.
To solve this, the download script now doesn't get the full, final URL passed as an arg, but instead a URL pattern (with placeholders like
{GOOS}). This enables the script to construct the URLs for any other OS/arch combo, download those, calculate the checksums and update all golangci-lint checksums in one go.Since I want to use the same approach in my private projects, I worked on this on my own time and therefore created the repo at Codeberg.
Using it
Unless you want to update a tool, nothing changes for you.
make lintwill still just download golangci-lint and use it.If you want to update a tool, you have to
makecommand to download the tool (make importswould also, for example, work for refreshing golangci-lint) with the env variableUGET_UPDATE=true. This will instruct µget to not install the binary for you, but re-download and re-checksum all variants of the tool that is knows from the checksum file. I.e.UGET_UPDATE=true make lintwill update all golangci-lint checksumshack/tools.checksums. Afterwardsmake lintjust works as expected.What Type of PR Is This?
/kind cleanup
Release Notes