refactor(backend): get version from package metadata

This commit is contained in:
K900
2023-11-14 10:21:49 +03:00
committed by AAGaming
parent 31a6202da9
commit 41c62c3a34
4 changed files with 27 additions and 7 deletions
-4
View File
@@ -158,7 +158,6 @@ class Updater:
logger.error("Unable to update as remoteVer is missing")
return
version = self.remoteVer["tag_name"]
download_url = None
download_filename = "PluginLoader" if ON_LINUX else "PluginLoader.exe"
download_temp_filename = download_filename + ".new"
@@ -217,9 +216,6 @@ class Updater:
self.context.loop.create_task(tab.evaluate_js(f"window.DeckyUpdater.updateProgress({new_progress})", False, False, False))
progress = new_progress
with open(path.join(getcwd(), ".loader.version"), "w", encoding="utf-8") as out:
out.write(version)
if ON_LINUX:
remove(path.join(getcwd(), download_filename))
shutil.move(path.join(getcwd(), download_temp_filename), path.join(getcwd(), download_filename))