Skip to content

Commit cebd743

Browse files
committed
use managerFilePatterns for fileMatch
1 parent 8b22d78 commit cebd743

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

.toolbox.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TB_SEMVER ?= $(TB_LOCALBIN)/semver
1919
## Tool Versions
2020
# renovate: packageName=k8s.io/code-generator/cmd/deepcopy-gen
2121
TB_DEEPCOPY_GEN_VERSION ?= v0.33.0
22-
# renovate: packageName=github.com/golangci/golangci-lint/v2/cmd/golangci-lint
22+
# renovate: packageName=github.com/golangci/golangci-lint/cmd/golangci-lint
2323
TB_GOLANGCI_LINT_VERSION ?= v2.1.6
2424
# renovate: packageName=github.com/goreleaser/goreleaser/v2
2525
TB_GORELEASER_VERSION ?= v2.9.0
@@ -40,7 +40,7 @@ $(TB_GINKGO): $(TB_LOCALBIN)
4040
.PHONY: tb.golangci-lint
4141
tb.golangci-lint: $(TB_GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
4242
$(TB_GOLANGCI_LINT): $(TB_LOCALBIN)
43-
test -s $(TB_LOCALBIN)/golangci-lint || GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
43+
test -s $(TB_LOCALBIN)/golangci-lint || GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
4444
.PHONY: tb.goreleaser
4545
tb.goreleaser: $(TB_GORELEASER) ## Download goreleaser locally if necessary.
4646
$(TB_GORELEASER): $(TB_LOCALBIN)
@@ -70,7 +70,7 @@ tb.reset:
7070
tb.update: tb.reset
7171
toolbox makefile --renovate -f $(TB_LOCALDIR)/Makefile \
7272
k8s.io/code-generator/cmd/[email protected]/kubernetes/code-generator \
73-
github.com/golangci/golangci-lint/v2/cmd/golangci-lint \
73+
github.com/golangci/golangci-lint/cmd/golangci-lint \
7474
github.com/goreleaser/goreleaser/v2 \
7575
github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen \
7676
github.com/bakito/semver

pkg/types/renovate/renovate.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ const (
55
CustomType = "regex"
66
DescriptionDeprecated = "Update toolbox tools in Makefile"
77
Description = "Update toolbox tools in .toolbox.mk"
8-
FileMatch = `^\.toolbox\.mk$`
8+
ManagerFilePatterns = `^\.toolbox\.mk$`
99
MatchString = `# renovate: packageName=(?<packageName>.+?)\s+.+?_VERSION \?= (?<currentValue>.+?)\s`
1010
DatasourceTemplate = "go"
1111
)
1212

1313
func Config() CustomManager {
1414
return CustomManager{
15-
CustomType: CustomType,
16-
Description: Description,
17-
FileMatch: []string{FileMatch},
18-
MatchStrings: []string{MatchString},
19-
DatasourceTemplate: DatasourceTemplate,
15+
CustomType: CustomType,
16+
Description: Description,
17+
ManagerFilePatterns: []string{ManagerFilePatterns},
18+
MatchStrings: []string{MatchString},
19+
DatasourceTemplate: DatasourceTemplate,
2020
}
2121
}
2222

2323
type CustomManagers []CustomManager
2424

2525
type CustomManager struct {
26-
CustomType string `json:"customType"`
27-
Description string `json:"description"`
28-
FileMatch []string `json:"fileMatch"`
29-
MatchStrings []string `json:"matchStrings"`
30-
DatasourceTemplate string `json:"datasourceTemplate"`
26+
CustomType string `json:"customType"`
27+
Description string `json:"description"`
28+
ManagerFilePatterns []string `json:"managerFilePatterns"`
29+
MatchStrings []string `json:"matchStrings"`
30+
DatasourceTemplate string `json:"datasourceTemplate"`
3131
}
3232

3333
func (m *CustomManager) UpdateParams() {
3434
m.Description = Description
35-
m.FileMatch = []string{FileMatch}
35+
m.ManagerFilePatterns = []string{ManagerFilePatterns}
3636
m.MatchStrings = []string{MatchString}
3737
m.DatasourceTemplate = DatasourceTemplate
3838
}

renovate.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"customType": "regex",
66
"datasourceTemplate": "go",
77
"description": "Update toolbox tools in .toolbox.mk",
8-
"fileMatch": [
9-
"^\\.toolbox\\.mk$"
8+
"managerFilePatterns": [
9+
".toolbox.mk"
1010
],
1111
"matchStrings": [
1212
"# renovate: packageName=(?<packageName>.+?)\\s+.+?_VERSION \\?= (?<currentValue>.+?)\\s"

testdata/renovate.incorrect-managers.expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"customType": "regex",
66
"datasourceTemplate": "go",
77
"description": "Update toolbox tools in .toolbox.mk",
8-
"fileMatch": [
8+
"managerFilePatterns": [
99
"^\\.toolbox\\.mk$"
1010
],
1111
"matchStrings": [

testdata/renovate.incorrect-managers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"customType": "regex",
66
"datasourceTemplate": "docker",
77
"description": "Update toolbox tools in Makefile",
8-
"fileMatch": [
8+
"managerFilePatterns": [
99
"^Docker$"
1010
],
1111
"matchStrings": [

testdata/renovate.no-managers.expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"customType": "regex",
66
"datasourceTemplate": "go",
77
"description": "Update toolbox tools in .toolbox.mk",
8-
"fileMatch": [
8+
"managerFilePatterns": [
99
"^\\.toolbox\\.mk$"
1010
],
1111
"matchStrings": [

testdata/renovate.other-managers.expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"customType": "regex",
66
"datasourceTemplate": "go",
77
"description": "this is an existing manager and should not be touched",
8-
"fileMatch": [
8+
"managerFilePatterns": [
99
"^Dockerfile"
1010
],
1111
"matchStrings": [
@@ -16,7 +16,7 @@
1616
"customType": "regex",
1717
"datasourceTemplate": "go",
1818
"description": "Update toolbox tools in .toolbox.mk",
19-
"fileMatch": [
19+
"managerFilePatterns": [
2020
"^\\.toolbox\\.mk$"
2121
],
2222
"matchStrings": [

testdata/renovate.other-managers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"customType": "regex",
66
"datasourceTemplate": "go",
77
"description": "this is an existing manager and should not be touched",
8-
"fileMatch": [
8+
"managerFilePatterns": [
99
"^Dockerfile"
1010
],
1111
"matchStrings": [

0 commit comments

Comments
 (0)