diff --git a/Makefile b/Makefile index 3e664903c1..a9792ef3c0 100644 --- a/Makefile +++ b/Makefile @@ -426,7 +426,12 @@ unit-test-coverage: .PHONY: tidy tidy: ## run go mod tidy $(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2)) + $(eval GO_TOOLCHAIN := $(shell grep -Eo '^toolchain\s+go[0-9.]+' go.mod | cut -d' ' -f2)) $(GO) mod tidy -compat=$(MIN_GO_VERSION) + @# workaround https://github.com/golang/go/issues/75331: restore toolchain if tidy dropped it + @if [ -n "$(GO_TOOLCHAIN)" ] && ! grep -qE '^toolchain\s' go.mod; then \ + $(GO) mod edit -toolchain=$(GO_TOOLCHAIN); \ + fi @$(MAKE) --no-print-directory $(GO_LICENSE_FILE) vendor: go.mod go.sum diff --git a/go.mod b/go.mod index 39dbeca046..9fa169b15b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module gitea.dev -go 1.26.5 +go 1.26.0 + +toolchain go1.26.5 require ( connectrpc.com/connect v1.20.0 diff --git a/renovate.json5 b/renovate.json5 index 3bf610db54..98b79270e2 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -98,11 +98,19 @@ { "matchManagers": ["gomod"], "matchDepNames": ["go"], - "matchDepTypes": ["golang"], + "matchDepTypes": ["golang", "toolchain"], // fast-track go and toolchain in their own PR + "groupName": "golang", "rangeStrategy": "bump", "schedule": ["at any time"], "minimumReleaseAge": "0", }, + { + "matchManagers": ["gomod"], + "matchDepNames": ["go"], + "matchDepTypes": ["golang"], + "matchUpdateTypes": ["patch", "major"], // go minimum bumps on minor only + "enabled": false, + }, { "matchManagers": ["npm"], "postUpdateOptions": ["pnpmDedupe"],