diff --git a/diracx-testing/src/diracx/testing/client_generation.py b/diracx-testing/src/diracx/testing/client_generation.py index 2c84cfdf6..e1f935b1e 100644 --- a/diracx-testing/src/diracx/testing/client_generation.py +++ b/diracx-testing/src/diracx/testing/client_generation.py @@ -20,7 +20,7 @@ AUTOREST_VERSION = "3.7.1" AUTOREST_CORE_VERSION = "3.10.4" -AUTOREST_PUGINS = { +AUTOREST_PLUGINS = { "@autorest/python": "6.34.2", "@autorest/modelerfour": "4.23.7", } @@ -156,7 +156,7 @@ def regenerate_client(openapi_spec: Path, client_module: str): ) cmd = ["autorest", f"--version={AUTOREST_CORE_VERSION}"] - for plugin, version in AUTOREST_PUGINS.items(): + for plugin, version in AUTOREST_PLUGINS.items(): cmd.append(f"--use={plugin}@{version}") cmd += [ "--python", diff --git a/renovate.json b/renovate.json index 8dcb1bc0e..35eec4ad7 100644 --- a/renovate.json +++ b/renovate.json @@ -7,6 +7,50 @@ "description": "Group all GitHub Actions updates together", "matchManagers": ["github-actions"], "groupName": "GitHub Actions" + }, + { + "description": "Group all Autorest updates together", + "matchManagers": ["custom.regex"], + "matchPackageNames": ["autorest", "@autorest/*"], + "groupName": "Autorest" + } + ], + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": [ + "diracx-testing/src/diracx/testing/client_generation.py" + ], + "versioningTemplate": "npm", + "datasourceTemplate": "npm", + "depNameTemplate": "autorest", + "matchStrings": [ + "AUTOREST_VERSION\\s*=\\s*[\"'](?\\S+)[\"']" + ] + }, + { + "customType": "regex", + "managerFilePatterns": [ + "diracx-testing/src/diracx/testing/client_generation.py" + ], + "versioningTemplate": "npm", + "datasourceTemplate": "npm", + "depNameTemplate": "@autorest/core", + "matchStrings": [ + "AUTOREST_CORE_VERSION\\s*=\\s*[\"'](?\\S+)[\"']" + ] + }, + { + "customType": "regex", + "managerFilePatterns": [ + "diracx-testing/src/diracx/testing/client_generation.py" + ], + "versioningTemplate": "npm", + "datasourceTemplate": "npm", + "matchStrings": [ + "AUTOREST_PLUGINS\\s*=\\s*{[^}]*}", + "\\s*[\"'](?\\S+)[\"']:\\s*[\"'](?\\S+)[\"'],?" + ] } ] }