[openstack-dev] How do I calculate the semantic version prior to a release?
Thomas Bechtold
tbechtold at suse.com
Fri Feb 26 12:34:03 UTC 2016
On Fri, Feb 26, 2016 at 06:52:03AM -0500, Doug Hellmann wrote:
> Excerpts from Neil Jerram's message of 2016-02-26 11:27:05 +0000:
> > On 26/02/16 11:16, Neil Jerram wrote:
[snipped]
> > v = version.VersionInfo('networking-calico').semantic_version()
> > print v.release_string()
> > print v.brief_string()
> > print v.debian_string()
> > print v.rpm_string()
>
> Those do work. I found that there's also an rpm_version command
> available like this:
>
> python setup.py rpm_version
The output for i.e. for Manila is here "1.9999.9999.b3.dev138"
Which is not really correct. The version is "2.0.0.0b3.dev138" .
rpm supports the tilde ("~") for pre versions. Converting a PEP440
compatible version to a rpm version can be done with code like:
https://github.com/openSUSE/obs-service-set_version/blob/master/set_version#L231
Cheers,
--
Tom
More information about the OpenStack-dev
mailing list