Added better version sorting thanks to jerone.
Sorting versions now works, with major releases ahead of rc, alpha, beta releases.
This commit is contained in:
parent
5dc3fdd3ea
commit
28c16b4254
3 changed files with 10 additions and 6 deletions
|
|
@ -19,7 +19,7 @@ import subprocess
|
|||
import logging
|
||||
import plistlib
|
||||
|
||||
from distutils.version import LooseVersion
|
||||
from semantic_version import Version
|
||||
|
||||
from zipfile import ZipFile
|
||||
from tarfile import TarFile
|
||||
|
|
@ -343,8 +343,10 @@ class CommandBase(object):
|
|||
old_versions = set(nw_version.values)
|
||||
new_versions = set(re.findall('(\S+) / \S+', html))
|
||||
|
||||
versions = sorted(list(old_versions.union(new_versions)),
|
||||
key=LooseVersion, reverse=True)
|
||||
union_versions = list(old_versions.union(new_versions))
|
||||
|
||||
versions = sorted(union_versions,
|
||||
key=Version, reverse=True)
|
||||
|
||||
nw_version.values = versions
|
||||
f = None
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
0.12.0
|
||||
0.12.0-rc1
|
||||
0.12.0-alpha3
|
||||
0.12.0-alpha2
|
||||
0.12.0-alpha1
|
||||
0.12.0
|
||||
0.11.3
|
||||
0.11.2
|
||||
0.11.1
|
||||
0.11.0-rc1
|
||||
0.11.0
|
||||
0.11.0-rc1
|
||||
0.10.5
|
||||
0.10.4
|
||||
0.10.3
|
||||
0.10.2
|
||||
0.10.1
|
||||
0.10.0
|
||||
0.10.0-rc2
|
||||
0.10.0-rc1
|
||||
0.10.0
|
||||
0.9.2
|
||||
0.9.1
|
||||
0.9.0
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
pillow
|
||||
qt
|
||||
pyside
|
||||
configobj
|
||||
semantic_version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue