On Tuesday 2019-11-12 12:25, Michal Rostecki wrote:
On Tue, Nov 12, 2019 at 08:30:40AM +0100, Jiri Slaby wrote:
Actually it is. The "~" convention originates in Debian and is used to denote pre-releases. So you can have v1.4 and during development v1.5~rc1, v1.5~rc2 etc which are newer than v1.4 but will be considered older when v1.5 final is released.
Right, that's why we use dot or plus: $ zypper versioncmp 1.15.0 1.15.0~20191108 1.15.0 is newer than 1.15.0~20191108 $ zypper versioncmp 1.15.0 1.15.0.20191108 1.15.0 is older than 1.15.0.20191108 $ zypper versioncmp 1.15.0 1.15.0+20191108 1.15.0 is older than 1.15.0+20191108
Exactly. And I thought that the standard way of versioning software built from unreleased git snapshoits is %PARENT_TAG%+git.%cd. Or eventually just %cd if the project does not have any tags and releases.
Worry not, even that case is covered: use 0~%cd. This practically sorts before anything else. (The only way upstream could break it is by making a really nondescript release number like 0~0 itself. But if they are smart, they will use 0~beta1/0~rc1 at the very least and all is well.) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org