Skip to content

Commit 116825a

Browse files
committed
use non-experimental slices package, configure renovate to pick up updates to _VERSION vars in Makefiles (https://docs.renovatebot.com/presets-customManagers/\#custommanagersmakefileversions)
1 parent 3b7a06a commit 116825a

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ REGISTRY ?= docker.io/linode
55
IMAGE_NAME ?= cluster-api-provider-linode
66
CONTROLLER_IMAGE ?= $(REGISTRY)/$(IMAGE_NAME)
77
TAG ?= dev
8-
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
8+
ENVTEST_K8SVERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
99
VERSION ?= $(shell git describe --always --tag --dirty=-dev)
1010
BUILD_ARGS := --build-arg VERSION=$(VERSION)
1111
SHELL = /usr/bin/env bash -o pipefail
@@ -15,7 +15,7 @@ MDBOOK_DEV_HOST = 0.0.0.0
1515
MDBOOK_DEV_PORT = 3000
1616
E2E_SELECTOR ?= all
1717

18-
# ENVTEST_K8S_VERSION
18+
# ENVTEST_K8SVERSION
1919
# - refers to the version of kubebuilder assets to be downloaded by envtest binary.
2020
# CONTAINER_TOOL
2121
# - defines the container tool to be used for building images.
@@ -155,7 +155,7 @@ docs:
155155
.PHONY: test
156156
test: generate fmt vet ## Run tests.
157157
go env -w GOTOOLCHAIN=go1.25.0+auto
158-
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(CACHE_BIN) -p path)" go test -race -timeout 60s `go list ./... | grep -v ./mock$$` -coverprofile cover.out.tmp
158+
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8SVERSION) --bin-dir $(CACHE_BIN) -p path)" go test -race -timeout 60s `go list ./... | grep -v ./mock$$` -coverprofile cover.out.tmp
159159
grep -v "zz_generated.*" cover.out.tmp > cover.out
160160
rm cover.out.tmp
161161

cloud/services/domains.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66
"fmt"
77
"net"
88
"net/netip"
9+
"slices"
910
"strings"
1011
"sync"
1112

1213
"github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/dns"
1314
"github.com/linode/linodego"
14-
"golang.org/x/exp/slices"
1515
"sigs.k8s.io/cluster-api/api/core/v1beta2"
1616
kutil "sigs.k8s.io/cluster-api/util"
1717

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ require (
2626
go.uber.org/automaxprocs v1.6.0
2727
go.uber.org/mock v0.6.0
2828
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
29-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
3029
golang.org/x/mod v0.28.0
3130
k8s.io/api v0.34.1
3231
k8s.io/apimachinery v0.34.1
@@ -325,6 +324,7 @@ require (
325324
go.yaml.in/yaml/v2 v2.4.2 // indirect
326325
go.yaml.in/yaml/v3 v3.0.4 // indirect
327326
golang.org/x/crypto v0.42.0 // indirect
327+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
328328
golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 // indirect
329329
golang.org/x/sync v0.17.0 // indirect
330330
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 // indirect

renovate.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,19 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:recommended"
5+
],
6+
"customManagers": [
7+
{
8+
"customType": "regex",
9+
"managerFilePatterns": [
10+
"/(^|/)Makefile$/",
11+
"/(^|/)makefile$/",
12+
"/(^|/)GNUMakefile$/",
13+
"/\\.mk$/"
14+
],
15+
"matchStrings": [
16+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?: (?:packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:*\\??=\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
17+
]
18+
}
519
]
620
}

0 commit comments

Comments
 (0)