Skip to content

Commit 9fc4231

Browse files
chore: renovate version maintenance for autorest client generation (#699)
* chore(renovate): renovate.json for Autorest versioning at client generation * chore(renovate): Group autorest package updates
1 parent 11433a3 commit 9fc4231

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

diracx-testing/src/diracx/testing/client_generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
AUTOREST_VERSION = "3.7.1"
2222
AUTOREST_CORE_VERSION = "3.10.4"
23-
AUTOREST_PUGINS = {
23+
AUTOREST_PLUGINS = {
2424
"@autorest/python": "6.34.2",
2525
"@autorest/modelerfour": "4.23.7",
2626
}
@@ -156,7 +156,7 @@ def regenerate_client(openapi_spec: Path, client_module: str):
156156
)
157157

158158
cmd = ["autorest", f"--version={AUTOREST_CORE_VERSION}"]
159-
for plugin, version in AUTOREST_PUGINS.items():
159+
for plugin, version in AUTOREST_PLUGINS.items():
160160
cmd.append(f"--use={plugin}@{version}")
161161
cmd += [
162162
"--python",

renovate.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,50 @@
77
"description": "Group all GitHub Actions updates together",
88
"matchManagers": ["github-actions"],
99
"groupName": "GitHub Actions"
10+
},
11+
{
12+
"description": "Group all Autorest updates together",
13+
"matchManagers": ["custom.regex"],
14+
"matchPackageNames": ["autorest", "@autorest/*"],
15+
"groupName": "Autorest"
16+
}
17+
],
18+
"customManagers": [
19+
{
20+
"customType": "regex",
21+
"managerFilePatterns": [
22+
"diracx-testing/src/diracx/testing/client_generation.py"
23+
],
24+
"versioningTemplate": "npm",
25+
"datasourceTemplate": "npm",
26+
"depNameTemplate": "autorest",
27+
"matchStrings": [
28+
"AUTOREST_VERSION\\s*=\\s*[\"'](?<currentValue>\\S+)[\"']"
29+
]
30+
},
31+
{
32+
"customType": "regex",
33+
"managerFilePatterns": [
34+
"diracx-testing/src/diracx/testing/client_generation.py"
35+
],
36+
"versioningTemplate": "npm",
37+
"datasourceTemplate": "npm",
38+
"depNameTemplate": "@autorest/core",
39+
"matchStrings": [
40+
"AUTOREST_CORE_VERSION\\s*=\\s*[\"'](?<currentValue>\\S+)[\"']"
41+
]
42+
},
43+
{
44+
"customType": "regex",
45+
"managerFilePatterns": [
46+
"diracx-testing/src/diracx/testing/client_generation.py"
47+
],
48+
"versioningTemplate": "npm",
49+
"datasourceTemplate": "npm",
50+
"matchStrings": [
51+
"AUTOREST_PLUGINS\\s*=\\s*{[^}]*}",
52+
"\\s*[\"'](?<depName>\\S+)[\"']:\\s*[\"'](?<currentValue>\\S+)[\"'],?"
53+
]
1054
}
1155
]
1256
}

0 commit comments

Comments
 (0)