On 12.06.2018 18:04, Martín Ferrari wrote:

Does it understand that 0.15.0-rc.1 is lower than 0.15.0, for example?
If that is the case, I could replace the tilde in the metadata.
I have not tested it, but looking at the code, it seems to be reasonably intelligent and handling major, minor, patch levels, as well as prerelease versions.

        // Quick comparison if a version has no prerelease versions
        if len(v.Pre) == 0 && len(o.Pre) == 0 {
                return 0
        } else if len(v.Pre) == 0 && len(o.Pre) > 0 {
                return 1
        } else if len(v.Pre) > 0 && len(o.Pre) == 0 {
                return -1
        }

So the version number 0.15.0-rc.1 would have len(v.Pre) > 0, and thus be considered less than 0.15.0, with len(v.Pre) == 0.

Reply via email to