mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Use coerce to allow PEP440 to partially work
This commit is contained in:
parent
10ea12c867
commit
cdd1ba1fe3
@ -82,7 +82,7 @@ def get_version_info():
|
|||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
tags = cache.get_or_set('github_release_tags', get_github_tags, TAG_CACHE_TIME)
|
tags = cache.get_or_set('github_release_tags', get_github_tags, TAG_CACHE_TIME)
|
||||||
current_ver = semver.Version(__version__, partial=True)
|
current_ver = semver.Version.coerce(__version__)
|
||||||
|
|
||||||
# Set them all to the current version to start
|
# Set them all to the current version to start
|
||||||
# If the server has only earlier or the same version
|
# If the server has only earlier or the same version
|
||||||
@ -103,7 +103,7 @@ def get_version_info():
|
|||||||
# Strip 'v' off front of verison if it exists
|
# Strip 'v' off front of verison if it exists
|
||||||
tag_name = tag_name[1:]
|
tag_name = tag_name[1:]
|
||||||
try:
|
try:
|
||||||
tag_ver = semver.Version(tag_name, partial=True)
|
tag_ver = semver.Version.coerce(tag_name)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
tag_ver = semver.Version('0.0.0', partial=True)
|
tag_ver = semver.Version('0.0.0', partial=True)
|
||||||
if tag_ver > current_ver:
|
if tag_ver > current_ver:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user