Skip to content

Commit

Permalink
fix: unexpected version update.
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Aug 29, 2023
1 parent e5af3d9 commit de5bf3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/src/module/update/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

def version_check() -> bool:
with open("config/version.txt", "rw") as f:
version = f.read()
if VERSION > version:
f.write(VERSION)
# Read last version
versions = f.readlines()
if VERSION[:3] > versions[-1][:3]:
f.write(VERSION[:3] + "\n")
return False
else:
return True

0 comments on commit de5bf3f

Please sign in to comment.