Support alphabetical / lexicographical versioning scheme #23477
mikaello
started this conversation in
Suggest an Idea
Replies: 1 comment 2 replies
-
There is already "loose" versioning which should sort correctly. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Timestamp-based versioning, where every commit is released as a new timestamp (+ maybe the hash of the commit) is not an uncommon versioning. To determine if a version is newer than another, lexical order is used, this is currently not supported by Renovate.
Example of a docker image with time-based versioning (this is just one example, the exact syntax of the timestamp may vary):
ghcr.io/nais/azurerator:2023-07-14-095208-25ad30c
To get around this in Renovate the regex versioning could be used to make the versioning fit into the SemVer box, but this has several problems:
2023-20-07T16-30-20.fe8a923
, best effort SemVer will be: 2023 (year) = major, 20 (month) = minor, 7 (day) = patch, 16 (hour) = build, 30 (minute) = revision)Click to see an example of how regex SemVer workaround could look like
Renovate config (just an example with a regex matcher, see the "YAML file" below for the regex versioning:
Some YAML file with a dependency defined:
This would be solved by providing a versioning scheme based on lexicographical order. It already exists some workarounds in the code that could be modified to support, e.g. in AWS Machine Image or Git versioning, if we had just compared
suffix
in_compare()
, wouldn't that be sufficient?There is also lexicographical sort order implemented in the deb versioning, so there is some prior effort to do this.
How to compare timestamp-based versioning is a question that has been asked multiple times before (e.g. #13020 and #17879), so I think a better solution than the regex versioning is worth looking into :-)
Beta Was this translation helpful? Give feedback.
All reactions