Add correct semantic version support
terrillmoore opened this issue · 0 comments
terrillmoore commented
Semantic versions require that the fourth field compare slightly differently. If blank, a version number is greater than the same version with a non-blank field. Those with non-blank fields compare more or less as expected. We have been using a 32-bit number with 8-bit fields, and all is well except comparing e.g 3.0.01 to 3.0.0.0 -- 3.0.0.0 is greater than 3.0.0.1. The sequence is:
3.0.0.1 < ... < 3.0.0.255 < 3.0.0.0
We will adopt semver, and use a '-' instead of a '.' in the third separator:
3.0.0-1 < ... < 3.0.0-255 < 3.0.0
We'll add some macros to simplify use (ARDUINO_LMIC_VERSION_IS_GE(a, b)
, etc.).