GUI: Add app update checks

This commit is contained in:
Mykola Grymalyuk
2023-05-13 18:19:57 -06:00
parent a2c0994bde
commit 2e964ba9c2
9 changed files with 341 additions and 58 deletions
+9
View File
@@ -35,6 +35,12 @@ class CheckBinaryUpdates:
if local_version is None:
local_version = self.binary_version_array
if local_version == remote_version:
if not self.constants.commit_info[0].startswith("refs/tags"):
# Check for nightly builds
return True
# Pad version numbers to match length (ie. 0.1.0 vs 0.1.0.1)
while len(remote_version) > len(local_version):
local_version.append(0)
@@ -99,6 +105,9 @@ class CheckBinaryUpdates:
response = network_handler.NetworkUtilities().get(REPO_LATEST_RELEASE_URL)
data_set = response.json()
if "tag_name" not in data_set:
return None
self.remote_version = data_set["tag_name"]
self.remote_version_array = self.remote_version.split(".")