mirror of
https://github.com/infinilabs/coco-app.git
synced 2026-05-18 05:04:56 +02:00
* refactor: custom_version_comparator() now compares semantic versions Previously, when comparing 2 versions, custom_version_comparator() only compared their build numbers, which was incorrect. See this case: ```text 0.8.0-2500 -> 0.9.0-SNAPSHOT-2501 -> 0.8.1-2502 ``` Coco adopts SemVer[1], and according to the specification, "0.8.1-2502" is older than "0.9.0-SNAPSHOT-2501" even though it has a larger build number. This commit refactors it to compare the semantic versions. [1]: Even though Coco uses SemVer, our version string does not follow the spec. In this implementation, we use `to_semver()` to do the conversion, see the code comments for more details. * correct comments