forked from namely/docker-protoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenovate.json5
275 lines (274 loc) · 8.05 KB
/
renovate.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
{
platform: "github",
masterIssue: true,
baseBranches: [
"master"
],
constraints: {
"go": "1.19"
},
extends: [
// A lot of default settings that you can extend can be found in the presets section: https://docs.renovatebot.com/presets-compatibility/
"config:base"
],
ignorePaths: [],
enabledManagers: [
// Since we only update proprietry files (e.g variables.sh)we should use 'regex' here (see the matchManagers in the packageRules section below)
// If you need more, see https://docs.renovatebot.com/modules/manager/
"regex",
"github-actions",
"gomod",
"npm"
],
"gomod":{
"fileMatch": ["(^|/)go.mod.tmpl$"]
},
regexManagers: [
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
// named capturing group, must include 'currentValue' as the name
"GRPC_VERSION=\\$\\{GRPC_VERSION:-(?<currentValue>.*?)\\}\\n"
],
// the name of the dependency in the package manager
depNameTemplate: "grpc/grpc",
// which package manager should Renovate Bot look to find this dependency?
datasourceTemplate: "github-releases",
// since we only keep the version up to minor and we do not use the v prefix, we need to extract major.minor from the fetched new version
extractVersionTemplate: "^v(?<version>\\d+\\.\\d+)\\.\\d+",
// by default versioningTemplate is semvar, but since we have the v prefix, we need to use a regex to specify the type of the version.
versioningTemplate: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)$",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GRPC_JAVA_VERSION=\\$\\{GRPC_JAVA_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "grpc/grpc-java",
datasourceTemplate: "github-releases",
extractVersionTemplate: "^v(?<version>\\d+\\.\\d+)\\.\\d+",
versioningTemplate: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)$",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GRPC_WEB_VERSION=\\$\\{GRPC_WEB_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "grpc-web",
datasourceTemplate: "npm"
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"NODE_PROTOC_GEN_GRPC_WEB_VERSION=\\$\\{NODE_PROTOC_GEN_GRPC_WEB_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "protoc-gen-grpc-web",
datasourceTemplate: "npm"
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GO_ENVOYPROXY_PGV_VERSION=\\$\\{GO_ENVOYPROXY_PGV_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "envoyproxy/protoc-gen-validate",
datasourceTemplate: "github-releases",
extractVersionTemplate: "^v(?<version>\\d+\\.\\d+\\.\\d+)"
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GRPC_GATEWAY_VERSION=\\$\\{GRPC_GATEWAY_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "github.com/grpc-ecosystem/grpc-gateway/v2",
datasourceTemplate: "go",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION=\\$\\{NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "grpc_tools_node_protoc_ts",
datasourceTemplate: "npm",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"NODE_GRPC_TOOLS_VERSION=\\$\\{NODE_GRPC_TOOLS_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "grpc-tools",
datasourceTemplate: "npm",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"TS_PROTO_VERSION=\\$\\{TS_PROTO_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "ts-proto",
datasourceTemplate: "npm",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GO_PROTOC_GEN_GO_VERSION=\\$\\{GO_PROTOC_GEN_GO_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "google.golang.org/protobuf",
datasourceTemplate: "go",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"GO_PROTOC_GEN_GO_GRPC_VERSION=\\$\\{GO_PROTOC_GEN_GO_GRPC_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "google.golang.org/grpc/cmd/protoc-gen-go-grpc",
datasourceTemplate: "go",
},
{
fileMatch: [
"variables.sh$",
".github/renovate.json5$",
"gwy/templates/Dockerfile.tmpl$"
],
matchStrings: [
"GO_VERSION=\\$\\{GO_VERSION:-(?<currentValue>.*?)\\}\\n",
"constraints: {(\\s*\\n\\s*)\"go\":\\s*\"(?<currentValue>.*?)\"",
"ARG go_version=(?<currentValue>.*?)\\n"
],
depNameTemplate: "go",
datasourceTemplate: "golang-version",
versioningTemplate: "npm",
},
{
fileMatch: [
"gwy/templates/Dockerfile.tmpl$"
],
matchStrings: [
"ARG alpine_version=(?<currentValue>.*?)\\n"
],
depNameTemplate: "alpine",
datasourceTemplate: "docker"
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"DEBIAN_VERSION=\\$\\{DEBIAN_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "debian",
datasourceTemplate: "docker",
versioningTemplate: "debian",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"MYPY_VERSION=\\$\\{MYPY_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "mypy-protobuf",
datasourceTemplate: "pypi",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"PROTOBUF_JS_VERSION=\\$\\{PROTOBUF_JS_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "protocolbuffers/protobuf-javascript",
datasourceTemplate: "github-releases",
}
],
packageRules: [
// here you can define how dependency updates should be grouped in one or multiple PRs:
// The following means that any major or minor updates to the specified packages will be grouped in one PR,
// and we would like to cut a new major release for our docker image, e.g 1.42_X => 1.46_0
{
matchPackageNames: ["grpc/grpc"],
groupName: "gRPC Version",
matchUpdateTypes: [
"minor",
"major"
],
groupSlug: "gRPC Major Upgrade"
},
{
matchPackageNames: ["grpc/grpc-java", "google.golang.org/grpc"],
groupName: "gRPC Version",
matchUpdateTypes: [
"minor",
"major"
],
"stabilityDays": 10,
groupSlug: "gRPC Major Upgrade"
},
// specifically for grpc-go, a patch version upgrade should be grouped with other misc dependencies, which you can find below.
// This would most likely mean we want to bump the docker image version without bumping the gRPC version, e.g 1.42_0 => 1.42_1
{
matchPackageNames: ["google.golang.org/grpc"],
matchUpdateTypes: [
"patch"
],
groupName: "Misc Non-major dependencies",
groupSlug: "patch-dependencies"
},
{
matchPackageNames: ["envoyproxy/protoc-gen-validate", "protocolbuffers/protobuf-javascript"],
matchUpdateTypes: [
"minor",
"patch"
],
groupName: "Misc Non-major dependencies",
groupSlug: "minor-dependencies"
},
{
matchDatasources: ["go", "npm", "pypi"],
excludePackageNames: ["github.com/grpc-ecosystem/grpc-gateway/v2", "google.golang.org/grpc", "go"],
matchUpdateTypes: [
"minor",
"patch"
],
groupName: "Misc Non-major dependencies",
groupSlug: "minor-dependencies"
},
{
matchPackagePatterns: ["*"],
excludePackageNames: [
"github.com/grpc-ecosystem/grpc-gateway/v2",
"google.golang.org/grpc",
"go",
"grpc/grpc",
"grpc/grpc-java",
"google.golang.org/grpc"
],
matchUpdateTypes: [
"minor",
"patch"
],
automerge: true,
automergeType: "pr"
}
]
}