Properly sort versions in "emsdk list" (#508)
Split version to integers but avoid exceptions in case there is a non-numerical character in some version. Comparison: Before | After 1.39.9 1.39.16 1.39.8 1.39.15 1.39.7 1.39.14 1.39.6 1.39.13 1.39.5 1.39.12 1.39.4 1.39.11 1.39.3 1.39.10 1.39.2 1.39.9 1.39.16 1.39.8 1.39.15 1.39.7 1.39.14 1.39.6 1.39.13 1.39.5 1.39.12 1.39.4 1.39.11 1.39.3 1.39.10 1.39.2 1.39.1 1.39.1 1.39.0 1.39.0 1.38.48 1.38.48 1.38.47 1.38.47 1.38.46 1.38.46 1.38.45 1.38.45 1.38.44 1.38.44 1.38.43 1.38.43 1.38.42 1.38.42 1.38.41 1.38.41 1.38.40 1.38.40 1.38.39 1.38.39 1.38.38 1.38.38 1.38.37 1.38.37 1.38.36 1.38.36 1.38.35 1.38.35 1.38.34 1.38.34 1.38.33 1.38.33
This commit is contained in:
Родитель
858b176f68
Коммит
6b0d151917
7
emsdk.py
7
emsdk.py
|
@ -2918,8 +2918,11 @@ def main():
|
|||
print('')
|
||||
|
||||
print('All recent (non-legacy) installable versions are:')
|
||||
releases_versions = sorted(load_releases_versions())
|
||||
releases_versions.reverse()
|
||||
releases_versions = sorted(
|
||||
load_releases_versions(),
|
||||
key=lambda x: [int(v) if v.isdigit() else -1 for v in x.split('.')],
|
||||
reverse=True,
|
||||
)
|
||||
for ver in releases_versions:
|
||||
print(' %s %s' % (ver, installed_sdk_text('sdk-releases-upstream-%s-64bit' % get_release_hash(ver, releases_info))))
|
||||
print()
|
||||
|
|
Загрузка…
Ссылка в новой задаче