Skip to content

Use parts of matchStrings in autoReplaceStringTemplate #29068

Discussion options

You must be logged in to vote

I've found a way better solution than before.

With this solution I ship around the "blank problem" and also don't need any custom named capture groupd.

For this solution I needed to understand, that Renovate only replaces the last match, when using recursive match strategy.
So in the last match I can focus on detecting the version and possible digest.
I didn't need to bother with whats between the version and the package name.

I have update my example with the latest tag: https://github.com/ThomasSteinbach/renovate-29068-example/blob/best-solution/renovate.json

The essence is, that in the last regex I only match the version. Then there is no need for a complex autoReplaceStringTemplate.

"…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@ThomasSteinbach
Comment options

@rarkins
Comment options

@ThomasSteinbach
Comment options

@ThomasSteinbach
Comment options

Answer selected by ThomasSteinbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants