[pkg-go] Bug#894131: Bug#894131: Bug#894131: prometheus-alertmanager: New upstream release 0.14.0 available. Please package and backport to stretch.

Daniel Swarbrick daniel.swarbrick at profitbricks.com
Tue Jun 12 17:12:33 BST 2018


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.



More information about the Pkg-go-maintainers mailing list