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

Add toolchain to go.mod overrides #148

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions make/go/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ GO_GET_PKGS ?=
# Settable
GO_MOD_VERSION ?= 1.21
# Settable
GO_MOD_TOOLCHAIN ?= 1.23.0
Copy link
Contributor Author

@emcfarlane emcfarlane Aug 19, 2024

Choose a reason for hiding this comment

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

We could set +auto to allow higher versions? https://go.dev/doc/toolchain

Copy link
Member

Choose a reason for hiding this comment

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

Let's do this for now and then change it later if we want

# Settable
GO_ALL_REPO_PKGS ?= ./cmd/... ./internal/...
# Settable
SKIP_GOLANGCI_LINT ?=
Expand Down Expand Up @@ -70,6 +72,7 @@ upgradegodeps:
rm -f go.mod go.sum
go mod init $(GO_MODULE)
go mod edit -go=$(GO_MOD_VERSION)
go mod edit -toolchain=go$(GO_MOD_TOOLCHAIN)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
go mod edit -toolchain=go$(GO_MOD_TOOLCHAIN)
go mod edit -toolchain=go$(GO_MOD_TOOLCHAIN)+auto

ifneq ($(GO_GET_PKGS),)
go get $(GO_GET_PKGS)
endif
Expand Down