Add transformVersion
to replace extractVersion
#31372
Closed
rarkins
started this conversation in
Suggest an Idea
Replies: 3 comments 2 replies
-
Hello @rarkins Regarding the discussion here : #31578
Thanks a lot in advance :) |
Beta Was this translation helpful? Give feedback.
2 replies
This comment has been hidden.
This comment has been hidden.
-
Converted to Issue: #34555 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
Related discussions:
There are times when a datasource's version string is similar but different to the string in the repo. For example
1.2.3
versus1-2-3
. We could use a versioning likeregex
to extract major/minor/patch from both of these, but if1-2-4
were available then the string1.2.3
in the repo would be replaced with1-2-4
instead of1.2.4
.I propose a new config term
transformVersion
to be used optionally withextractVersion
where:extractVersion
are made available totransformVersion
(maybe handlebars template syntax instead of regex syntax?)transformVersion
would be theversion
result which is used (no capture group necessary)We could also potentially use different names for clarity, e.g.
extractDatasourceVersion
andtransformDatasourceVersion
, which hopefully are more clear that they apply to the datasource lookup only and not elsewhere in Renovate.Alternatively we could combine these into a single config option, considering that transforming can't exist on its own anyway:
transformDatasourceVersion
version
capture groupextractVersion
string to be an array of length 1 fortransformDatasourceVersion
Beta Was this translation helpful? Give feedback.
All reactions