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

Hitting curl https://go.dev/VERSION?m=text returns a go version package which is not available to download #51135

Closed
domstorey opened this issue Feb 10, 2022 · 4 comments

Comments

@domstorey
Copy link

domstorey commented Feb 10, 2022

What version of Go are you using (go version)?

Latest stable

Does this issue reproduce with the latest release?

GOLANG_LATEST_STABLE_VERSION=$(curl https://go.dev/VERSION?m=text)

This currently returns go1.17.7 but go1.17.6 is the latest which is built and so this has broken our CICD pipeline

image

Source available but not binary downloadable
image

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

curl https://go.dev/VERSION?m=text should return the latest version available for download.

So for example this code works in our docker container:

RUN GOLANG_LATEST_STABLE_VERSION=$(curl https://go.dev/VERSION?m=text) \
  && curl -OL https://go.dev/dl/${GOLANG_LATEST_STABLE_VERSION}.linux-ppc64le.tar.gz \

What did you see instead?

image

:-)

@seankhliao
Copy link
Member

VERSION is the version running the website, not latest version to download.

@domstorey
Copy link
Author

Can you suggest a way to get the latest version available to download for a CICD pipeline?

@seankhliao
Copy link
Member

go.dev/dl/?mode=json

@domstorey
Copy link
Author

domstorey commented Feb 11, 2022

Thank you :-) worked perfectly...

GOLANG_LATEST_STABLE_VERSION=$(curl https://go.dev/dl/?mode=json | grep -o 'go.*.linux-ppc64le.tar.gz' | head -n 1 | tr -d '\r\n' )

which also evolved too:

GOLANG_LATEST_STABLE_VERSION=$(curl "https://go.dev/dl/?mode=json" | jq -r '.[0].files[].filename | select(test("go.*.linux-ppc64le.tar.gz"))') \

@golang golang locked and limited conversation to collaborators Feb 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants