Skip to content
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

Use json to fetch latest versions #216

Open
SuperQ opened this issue Jul 31, 2023 · 6 comments
Open

Use json to fetch latest versions #216

SuperQ opened this issue Jul 31, 2023 · 6 comments

Comments

@SuperQ
Copy link
Member

SuperQ commented Jul 31, 2023

Go provides a json url to fetch the latest versions: https://go.dev/dl/?mode=json

We should use this data rather than polling for file download URLs.

@gitperr
Copy link
Contributor

gitperr commented Feb 18, 2024

How is it being polled at the moment? I thought it was being hardcoded.

Can you extend this example a bit? I can try to implement it.

@SuperQ
Copy link
Member Author

SuperQ commented Feb 18, 2024

The builder-bumper does a really basic HTTP HEAD request on the next possible version(s) to see if the release tar files exist to download.

@gitperr
Copy link
Contributor

gitperr commented Feb 19, 2024

Are we only interested in linux-amd ones?

I have some dirty code at the moment that fetches the link for it, but I could iterate more and add some other things too.

$ ./builder-bumper "1.20" "1.21"
https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz

@SuperQ
Copy link
Member Author

SuperQ commented Feb 19, 2024

We only actually care about the current stable version numbers, so we can decide if we need to update.

@gitperr
Copy link
Contributor

gitperr commented Feb 19, 2024

Should it return the version(s) only instead?

@SuperQ
Copy link
Member Author

SuperQ commented Feb 19, 2024

Please take a look at what the builder-bumper does, the actual functionality should not change. Just how it detects what version(s) to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants