How to use a custom regex manager to update an URL that contains the version number twice? #44817
Unanswered
kastl-ars
asked this question in
Request Help
Replies: 1 comment 1 reply
|
You don't capture the version twice — Renovate only allows one {
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/.*\\/kustomization\\.yaml/"],
"matchStrings": [
"renovate datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)\\s+- \\S+/download/(?<currentValue>\\S+)/release-\\S+\\.yaml"
],
"autoReplaceStringTemplate": "renovate datasource={{{datasource}}} depName={{{depName}}}\n - https://github.com/{{{depName}}}/releases/download/{{{newValue}}}/release-{{{ replace \"^v\" \"\" newValue }}}.yaml"
}
]
}
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
Forgejo
Which version of Renovate are you using?
No response
Please tell us more about your question or problem
Dear all,
using a regex manager it is rather simple to update a version number in a
kustomization.yaml.But how would I need to write the regex if the version number appears twice in the URL?
My current example is kpack:
As you can see, the version number is appearing twice, in the "path" and in the file name.
For a non-versioned
release.yamlthis regex works:Using the
(?<currentValue>\\S+)snippet again leads to an error in the renovate-config-validator (as there can be only one capture group). But how to specify that the new version should be updated twice?Do I need to add a
autoReplaceStringTemplateusing{{{newValue}}}twice?Kind Regards,
Johannes
Logs (if relevant)
Logs
All reactions