mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-10 05:24:18 +09:00
chore: separate go minimum and build toolchain (#38559)
- split the go version in `go.mod` into `go` and `toolchain` again - add a workaround for https://github.com/golang/go/issues/75331 so `make tidy` never drops `toolchain` - configure renovate to bump `go` on minor releases and `toolchain` on every release - go and toolchain bumps land in a separate, fast-tracked PR, as both carry security fixes Replaces: https://github.com/go-gitea/gitea/pull/37846
This commit is contained in:
@@ -426,7 +426,12 @@ unit-test-coverage:
|
|||||||
.PHONY: tidy
|
.PHONY: tidy
|
||||||
tidy: ## run go mod 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 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)
|
$(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)
|
@$(MAKE) --no-print-directory $(GO_LICENSE_FILE)
|
||||||
|
|
||||||
vendor: go.mod go.sum
|
vendor: go.mod go.sum
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
module gitea.dev
|
module gitea.dev
|
||||||
|
|
||||||
go 1.26.5
|
go 1.26.0
|
||||||
|
|
||||||
|
toolchain go1.26.5
|
||||||
|
|
||||||
require (
|
require (
|
||||||
connectrpc.com/connect v1.20.0
|
connectrpc.com/connect v1.20.0
|
||||||
|
|||||||
+9
-1
@@ -98,11 +98,19 @@
|
|||||||
{
|
{
|
||||||
"matchManagers": ["gomod"],
|
"matchManagers": ["gomod"],
|
||||||
"matchDepNames": ["go"],
|
"matchDepNames": ["go"],
|
||||||
"matchDepTypes": ["golang"],
|
"matchDepTypes": ["golang", "toolchain"], // fast-track go and toolchain in their own PR
|
||||||
|
"groupName": "golang",
|
||||||
"rangeStrategy": "bump",
|
"rangeStrategy": "bump",
|
||||||
"schedule": ["at any time"],
|
"schedule": ["at any time"],
|
||||||
"minimumReleaseAge": "0",
|
"minimumReleaseAge": "0",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"matchManagers": ["gomod"],
|
||||||
|
"matchDepNames": ["go"],
|
||||||
|
"matchDepTypes": ["golang"],
|
||||||
|
"matchUpdateTypes": ["patch", "major"], // go minimum bumps on minor only
|
||||||
|
"enabled": false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"matchManagers": ["npm"],
|
"matchManagers": ["npm"],
|
||||||
"postUpdateOptions": ["pnpmDedupe"],
|
"postUpdateOptions": ["pnpmDedupe"],
|
||||||
|
|||||||
Reference in New Issue
Block a user