K3s Version #13845
-
I have Problems updating a K3s Version.
My Renovate Json defines a Regex Matcher Like this.
The Log of Renovate gives me this json.
I don't get why the config should be invalid. I tested the Regex with regex101: https://regex101.com/r/Kz04Be/1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Don't escape with |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, Maybe a little late to the party but there is a very useful solution to this in the renovate documentation: {
"customManagers": [
{
"customType": "regex",
"fileMatch": ["k3s.version"],
"matchStrings": ["(?<currentValue>\\S+)"],
"depNameTemplate": "k3s",
"versioningTemplate": "semver-coerced",
"datasourceTemplate": "custom.k3s"
}
],
"customDatasources": {
"k3s": {
"defaultRegistryUrlTemplate": "https://update.k3s.io/v1-release/channels",
"transformTemplates": [
"{\"releases\":[{\"version\": $$.(data[id = 'stable'].latest),\"sourceUrl\":\"https://github.com/k3s-io/k3s\",\"changelogUrl\":$join([\"https://github.com/k3s-io/k3s/releases/tag/\",data[id = 'stable'].latest])}],\"sourceUrl\": \"https://github.com/k3s-io/k3s\",\"homepage\": \"https://k3s.io/\"}"
]
}
}
} k3s.version
@Syndlex @viceice |
Beta Was this translation helpful? Give feedback.
you forgot to escape some more\
:(?<major>\d+)
>(?<major>\\d+)
Don't escape with
\
in your source file