Recognise all even minor versions as stable #43

Closed
wants to merge 3 commits into
from

2 participants

@welwood08

The old pattern for determining stable versions only matches if the 2nd part is exactly two, four, six or eight. Change it to be ready for a possible 1.0 or 0.10 stable version in the future.

@welwood08 welwood08 Recognise all even minor versions as stable
The old pattern for determining stable versions only matches if the 2nd part is exactly two, four, six or eight. Change it to be ready for a possible 1.0 or 0.10 stable version in the future.
b3a5f26
@isaacs
Owner

That's not quite right, though... 0.0.2 was anything but stable, and this will not match 0.10.0

I think maybe this pattern does what you want? ([0-9]+[02468]|[2468])

@welwood08 welwood08 Actually recognise 0.10
code + tired = fail
0ec3aa9
@welwood08

Is not matching 0.0.2 required when the result is immediately sorted descending from latest version and then the latest version only returned?

@isaacs
Owner

Yeah, 0.0 versions don't matter, and I guess 1.0.0 will be considered stable. The ? should be a *, though. We may get to 0.100.0 some day ;)

@welwood08

[1-9]?[02468]+ should already match 100, no?

edit: ah, but not 110 ;)

@welwood08 welwood08 Also recognise 0.110
Covering all possible eventualities in all multiverses ftw!
c6e4708
@isaacs
Owner

Squashed and landed on a17416a, as [0-9]*[02468], since that's simpler and matches all the same versions as the ([1-9][0-9]*)? bit (since it'll never start with 0).

@isaacs isaacs closed this Aug 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment