Skip to content

Commit 259b7ad

Browse files
committed
chore(renovate): update config for golangci-lint lang-version and upgarde hints
1 parent eb81599 commit 259b7ad

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111

1212
- uses: actions/[email protected]
1313
with:
14-
# renovate: go-version
1514
go-version: 1.18.4
1615

1716
- name: Install go tooling

.github/workflows/test-and-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
- name: Set up Go
3232
uses: actions/[email protected]
3333
with:
34-
# renovate: go-version
3534
go-version: 1.18.4
3635

3736
- uses: docker/[email protected]

renovate.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@
1313
"regexManagers": [
1414
{
1515
"description": "Upgrade go version",
16-
"fileMatch": [
17-
"(^workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$",
18-
"^\\.golangci\\.yml"
19-
],
20-
"matchStrings": [
21-
"# renovate: go-version\\s*go-version:\\s*\"?(?<currentValue>.*)\"?",
22-
"lang-version: \"(?<currentValue>.*)\""
23-
],
16+
"fileMatch": ["(^workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
17+
"matchStrings": ["go-version:\\s(?<currentValue>.*)"],
2418
"datasourceTemplate": "golang-version",
2519
"depNameTemplate": "go"
2620
},
@@ -30,13 +24,20 @@
3024
"matchStrings": [
3125
"# renovate:\\sdatasource=(?<datasource>.*?)\\sdepName=(?<depName>.*?)\\s.*@(?<currentValue>.*)"
3226
]
27+
},
28+
{
29+
"description": "Upgrade go minor for golangci-lint",
30+
"fileMatch": ["^\\.golangci\\.yml"],
31+
"matchStrings": ["lang-version: \"(?<currentValue>.*)\""],
32+
"datasourceTemplate": "github-tags",
33+
"depNameTemplate": "golang/go"
3334
}
3435
],
3536
"packageRules": [
3637
{
37-
"description": "The golang CI language version only uses major.minor",
38-
"matchFiles": [".golangci.yml"],
39-
"matchPackageNames": ["go"],
38+
"description": "Parse go version for golangci-lint from GitHub tags",
39+
"extractVersion": "^go(?<version>\\d+\\.\\d+)",
40+
"matchPackageNames": ["golang/go"],
4041
"groupName": "go"
4142
},
4243
{
@@ -49,7 +50,7 @@
4950
"description": "Group go upgrades",
5051
"matchPackageNames": ["go", "golang"],
5152
"groupName": "go",
52-
"prHeader": ":warning: Only upgrade the go version once the matching swagger version has been released. Check [the Makefile](https://github.com/envelope-zero/backend/blob/main/Makefile) for the current swagger version. Rule: swagger 1.8.4 -> go 1.18.4. This is needed as swagger needs to be rebuild with the exact go version (or newer) that the code that it generates documentation from has been built with."
53+
"prHeader": ":warning: Only upgrade the go version once you verified locally that the new go version works with the current swagger version. To do so, upgrade your machine to the new go version and run `pre-commit run --all-files`."
5354
},
5455
{
5556
"description": "Group swaggo/swag upgrades",

0 commit comments

Comments
 (0)