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

makefile+scripts: specify Go version for building release binaries #1051

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Jul 26, 2024

Closes #1045

To ensure our release binaries are reproducible, they must be built with a specific version of Go. This commit sets the GOTOOLCHAIN environment variable when building release binaries, ensuring that the build command uses the targeted Go version.

The GOTOOLCHAIN environment variable is supported only in Go version 1.21 or newer. This commit verifies that the invoked Go version meets this requirement.

@ffranr ffranr requested review from guggero and gijswijs July 26, 2024 08:41
@ffranr ffranr self-assigned this Jul 26, 2024
@ffranr
Copy link
Contributor Author

ffranr commented Jul 26, 2024

I'll add #1045 (comment) in a different PR.

Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

While the code itself looks good, I'm very skeptical of the approach... See inline comment.

scripts/release.sh Outdated Show resolved Hide resolved
scripts/release.sh Outdated Show resolved Hide resolved
This commit updates `scripts/release.sh` to include a check for the
correct Go version before executing the release build. This ensures that
the release binaries are built with the specified Go version,
maintaining consistency and integrity for developer signatures.
@ffranr ffranr force-pushed the release-gotoolchain branch from 9571b9e to bea4667 Compare July 26, 2024 23:13
@ffranr
Copy link
Contributor Author

ffranr commented Jul 26, 2024

Latest commit is just a check which returns an error if the incorrect Go version is used.

@ffranr ffranr requested a review from guggero July 26, 2024 23:15
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

tACK, LGTM 🎉

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🧊

@Roasbeef Roasbeef added this pull request to the merge queue Jul 29, 2024
Merged via the queue into main with commit afbd152 Jul 29, 2024
16 checks passed
@guggero guggero deleted the release-gotoolchain branch July 29, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[feature]: Ensure Golang Version 1.22.3 for make release Command to Reproduce Release Manifest
3 participants