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

postrelease: prefer the Go version in go.mod's toolchain directive #49891

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

zmb3
Copy link
Collaborator

@zmb3 zmb3 commented Dec 6, 2024

The go tool will automatically remove the toolchain directive if it happens to be the same as the go directive. This means in order to reliably get the version of Go that is used to build, we need to first check the toolchain directive, and fall back to the go directive only if the toolchain is not specified.

Additionally, the toolchain directive is prefixed with "go", so we need to strip that to get consistent output.

The go tool will automatically remove the toolchain directive if it
happens to be the same as the go directive. This means in order to
reliably get the version of Go that is used to build, we need to first
check the toolchain directive, and fall back to the go directive only
if the toolchain is not specified.

Additionally, the toolchain directive is prefixed with "go", so we
need to strip that to get consistent output.
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from gzdunek December 6, 2024 17:56
@zmb3 zmb3 added this pull request to the merge queue Dec 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 6, 2024
@zmb3 zmb3 added this pull request to the merge queue Dec 6, 2024
Merged via the queue into master with commit c117c70 Dec 6, 2024
42 of 43 checks passed
@zmb3 zmb3 deleted the zmb3/postrelease-fix branch December 6, 2024 20:53
@public-teleport-github-review-bot

@zmb3 See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR
branch/v17 Create PR

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

Successfully merging this pull request may close these issues.

3 participants