Match a Github release with a version prefix and that uses underscores #28487
-
What would you like help with?I would like help with my configuration How are you running Renovate?Self-hosted If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.GitHub action v40.1.9 Please tell us more about your question or problemI would like to use Renovate to manage my Docker dependency on Crypto++. I've tried github-tags and github-releases as the datasourceTemplate. The version tags of Crypto++ are prefixed with Dockerfile ARG CRYPTOPP_VERSION=8.8.0
RUN curl -fsSL "https://github.com/weidai11/cryptopp/archive/refs/tags/CRYPTOPP_${CRYPTOPP_VERSION//./_}/cryptopp${CRYPTOPP_VERSION//./}.tar.gz" renovate.json5 {
baseBranches: [
"main",
],
enabledManagers: [
"custom.regex",
],
customManagers: [
{
depNameTemplate: "Crypto++",
fileMatch: ["^Dockerfile$"],
matchStrings: ["ARG CRYPTOPP_VERSION=(?<currentValue>.*?)\\n"],
datasourceTemplate: "github-releases",
packageNameTemplate: "weidai11/cryptopp",
},
],
packageRules: [
{
matchPackageNames: ["weidai11/cryptopp"],
versionCompatibility: "^(?<compatibility>CRYPTOPP_)(?<version>.*)$",
versioning: "regex:^(?<major>\\d+)_(?<minor>\\d+)_(?<patch>\\d+)$",
},
],
} The above configuration does not create a PR if I want to upgrade from A related topic that I found but that does not have the underscore requirement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We might be able to figure out a way. First of all, is there anything stopping you from doing one of these?
If you took this approach then you could define regex versioning which applies the same way to both your repo strings as well as the github release strings. |
Beta Was this translation helpful? Give feedback.
That put me on the right track.
Dockerfile
renovate.json5