Skip to content

hack/vendor.sh: allow go version to be specified with .0#42779

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:fix_hack_vendor
Aug 23, 2021
Merged

hack/vendor.sh: allow go version to be specified with .0#42779
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:fix_hack_vendor

Conversation

@thaJeztah
Copy link
Member

Golang '.0' releases are released without a trailing .0 (i.e. go1.17
is equal to go1.17.0). For the base image, we want to specify the go
version including their patch release (golang:1.17 is equivalent to
go1.17.x), so adjust the script to also accept the trailing .0, because
otherwise the download-URL is not found:

hack/vendor.sh archive/tar
update vendored copy of archive/tar
downloading: https://golang.org/dl/go1.17.0.src.tar.gz
curl: (22) The requested URL returned error: 404

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added this to the 21.xx milestone Aug 23, 2021
@thaJeztah thaJeztah requested a review from tianon as a code owner August 23, 2021 14:57
@thaJeztah thaJeztah mentioned this pull request Aug 23, 2021
2 tasks
hack/vendor.sh Outdated
Comment on lines 20 to 21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want this to be specific to just the trailing .0 so we don't drop patch releases, right?

Suggested change
echo "downloading: https://golang.org/dl/go${GO_VERSION%.*}.src.tar.gz"
curl -fsSL "https://golang.org/dl/go${GO_VERSION%.*}.src.tar.gz" \
echo "downloading: https://golang.org/dl/go${GO_VERSION%.0}.src.tar.gz"
curl -fsSL "https://golang.org/dl/go${GO_VERSION%.0}.src.tar.gz" \

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks! I always struggle with these and forget the correct syntax, LOL. Yup, that's what my intent was

Golang '.0' releases are released without a trailing .0 (i.e. go1.17
is equal to go1.17.0). For the base image, we want to specify the go
version including their patch release (golang:1.17 is equivalent to
go1.17.x), so adjust the script to also accept the trailing .0, because
otherwise the download-URL is not found:

    hack/vendor.sh archive/tar
    update vendored copy of archive/tar
    downloading: https://golang.org/dl/go1.17.0.src.tar.gz
    curl: (22) The requested URL returned error: 404

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

Fixed! PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants