1
0
Fork 0

autoupdate_app_sources: don't push an upgrade if newest version is actually older than current version

This commit is contained in:
Alexandre Aubin 2023-07-24 21:09:13 +02:00
parent 37a8f7a505
commit 0ba917b0d6

View file

@ -175,6 +175,18 @@ class AppAutoUpdater:
print(f"Current version in manifest: {self.current_version}")
print(f"Newest version on upstream: {new_version}")
# Maybe new version is older than current version
# Which can happen for example if we manually release a RC,
# which is ignored by this script
# Though we wrap this in a try/except pass, because don't want to miserably crash
# if the tag can't properly be converted to int tuple ...
try:
if tag_to_int_tuple(self.current_version) > tag_to_int_tuple(new_version):
print("Up to date (current version appears more recent than newest version found)")
continue
except:
pass
if self.current_version == new_version:
print("Up to date")
continue