Skip to content

Commit 106c1c7

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

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

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: 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.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: 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.other-managers.expected.json

Lines changed: 3 additions & 3 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,8 +16,8 @@
1616
"customType": "regex",
1717
"datasourceTemplate": "go",
1818
"description": "Update toolbox tools in .toolbox.mk",
19-
"fileMatch": [
20-
"^\\.toolbox\\.mk$"
19+
"managerFilePatterns": [
20+
".toolbox.mk"
2121
],
2222
"matchStrings": [
2323
"# renovate: packageName=(?<packageName>.+?)\\s+.+?_VERSION \\?= (?<currentValue>.+?)\\s"

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)