-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Configure Renovate https://docs.renovatebot.com/ * Rename .github/workflows/renovate.json5 to .github/renovate.json5
- Loading branch information
1 parent
6cc8530
commit 90a93ef
Showing
1 changed file
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
platform: "github", | ||
masterIssue: true, | ||
baseBranches: [ | ||
"master" | ||
], | ||
extends: [ | ||
// A lot of default settings that you can extend can be found in the presets section: https://docs.renovatebot.com/presets-compatibility/ | ||
":ignoreModulesAndTests" | ||
], | ||
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" | ||
], | ||
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: [ | ||
"gwy/templates/go.mod.tmpl$" | ||
], | ||
matchStrings: [ | ||
"google.golang.org/grpc\\s+(?<currentValue>.*?)\\n+" | ||
], | ||
depNameTemplate: "grpc/grpc-go", | ||
datasourceTemplate: "github-releases", | ||
versioningTemplate: "regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$", | ||
}, | ||
{ | ||
fileMatch: [ | ||
"variables.sh$" | ||
], | ||
matchStrings: [ | ||
// notice we update the same version in two locations perhaps we don't need two separate variables?) | ||
"GRPC_WEB_VERSION=\\$\\{GRPC_WEB_VERSION:-(?<currentValue>.*?)\\}\\n", | ||
"NODE_PROTOC_GEN_GRPC_WEB_VERSION=\\$\\{NODE_PROTOC_GEN_GRPC_WEB_VERSION:-(?<currentValue>.*?)\\}\\n" | ||
], | ||
depNameTemplate: "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+)" | ||
}, | ||
], | ||
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", "grpc/grpc-java", "grpc/grpc-go"], | ||
groupName: "gRPC Version", | ||
matchUpdateTypes: [ | ||
"minor", | ||
"major" | ||
], | ||
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: ["grpc/grpc-go"], | ||
matchUpdateTypes: [ | ||
"patch" | ||
], | ||
groupName: "Misc Non-major dependencies", | ||
groupSlug: "patch-dependencies" | ||
}, | ||
// | ||
{ | ||
matchPackageNames: ["grpc-web", "envoyproxy/protoc-gen-validate"], | ||
matchUpdateTypes: [ | ||
"minor", | ||
"patch" | ||
], | ||
groupName: "Misc Non-major dependencies", | ||
groupSlug: "minor-dependencies" | ||
}, | ||
{ | ||
matchPackageNames: ["grpc-web", "envoyproxy/protoc-gen-validate"], | ||
matchUpdateTypes: [ | ||
"major" | ||
], | ||
groupName: "Misc Major Dependencies", | ||
groupSlug: "major-dependencies" | ||
}, | ||
] | ||
} |