better way if manually updated

This commit is contained in:
piair 2023-04-04 20:50:56 +02:00
parent 0588180dda
commit 3385540350
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#/usr/bin/python3.10
from packaging.version import parse as parse_version
import configparser
import os
import shutil
@ -157,13 +157,15 @@ def proxy() :
def check_update():
try :
latest = requests.get("https://api.github.com/repos/piair338/MsRewards/releases").json()[0]["tag_name"]
latest = parse_version(latest)
except Exception as e :
print(e)
return ()
f = open("./version", 'r')
txt = f.readlines()[0].replace("\n","")
f.close()
if (txt == latest) :
cur = parse_version(txt)
if (cur < latest) :
print("Already up to date.")
else :
print(f"updating to {latest}")

View File

@ -9,3 +9,4 @@ pyvirtualdisplay
pillow
EasyProcess
pyotp
packaging

View File

@ -1 +1 @@
v5.1.1
v5.1.2