Uses a custom compare function to sort the versions into the correct order. This however highlights an issue with the versioning as they don't always follow official semantic version conventions
Therefore the regular expression was modified to handle edge cases that cropped up in preliminary testing. Unfortunately I don't know what possible version formats there can be out there, so this handles what I've seen so far, which includes:
missing patch field
custom pre-release format like 0b0 or 0a1
There could be any number of version formats used out there, so it might be worth verifying versions with something like the Python semver package to ensure that the compare function doesn't get even longer
to handle all the possible formats and restrict versioning to formats that follow the semantic version spec.
If the priority is to allow for any version format, then unfortunately sorting them will become rather complicated.
Uses a custom compare function to sort the versions into the correct order. This however highlights an issue with the versioning as they don't always follow official semantic version conventions
Therefore the regular expression was modified to handle edge cases that cropped up in preliminary testing. Unfortunately I don't know what possible version formats there can be out there, so this handles what I've seen so far, which includes:
There could be any number of version formats used out there, so it might be worth verifying versions with something like the Python semver package to ensure that the compare function doesn't get even longer to handle all the possible formats and restrict versioning to formats that follow the semantic version spec.
If the priority is to allow for any version format, then unfortunately sorting them will become rather complicated.
FIX #7