Version rules: Matching "0" patch version with tag?

In the channel version rule I’m trying to match version 4.8.0 <= x < 4.9.0 but this fails.
I’ve tried [4.8,4.9) and just 4.8 but the validation shows:

4.8.0 (valid)
4.8.1 (valid)
4.8.1-dev-234 (valid)
4.8.0-dev-234 (NOT valid)

Why isn’t 4.8.0-dev-234 valid?

Hi,

Thanks for getting in touch! In SemVer’s precedence ranking, the pre-release tag -dev-234 precedes 4.8.0, whereas your expression stops at 4.8.0, which is why your expression is not picking up 4.8.0-dev-234. To make the expression inclusive of 4.8.0-dev-234 you will need to either change it to (4.7,4.9) which is everything between, exclusive of 4.7 & 4.9 or add the pre-release tag to make it: [4.8-dev-234,4.9).

So either of the following will work here.
(4.7,4.9)
[4.8-dev-234,4.9)

You can find more info on this at the following page: http://semver.org/spec/v2.0.0.html

Let me know how you go. :slight_smile:

Best regards,
Daniel

Hi Daniel,

Thanks, well yes but this is somewhat trouble. You see, “4.8.0-dev-234” is just an example, it could be “4.8.0-featureX-234” or similar. So having to specify the pre-release tag is a problem. Is there a way to specify any tag?

Anyways, going with your suggestion with “(4.7,4.9)” would still match “4.9.0-dev-1377” which of course is also a problem. I just want all builds from “4.8” to be matched here. More or less regardless of what comes after.

Possible?

Note, I guess I could just do smth like (4.7.10000,4.8.10000) or similar…

Hi,

Thanks for getting back. I think you will be fine as long as the max version in your expression is the latest version you would want to include. With (4.7.10000,4.8.10000) you will be including everything before 4.8.10000 excluding 4.8.10000. Using the parenthesis makes it select the range exclusive of the values defined. Using [] is the same but inclusive of the values defined.

You can use something like (4.7,4.8.99999] to select everything from 4.7, excluding 4.7, up to and including 4.8.9999.

Sorry if I’m at all making this confusing. Let me know if this helps. :slight_smile:

Best regards,
Daniel

Hi Daniel,

No you’re helping me alright, I got what I want now, thanks :slight_smile:

Hi,

Great! Glad to hear. :slight_smile:

Best regards,
Daniel