Skip to content

Commit

Permalink
Updated Version
Browse files Browse the repository at this point in the history
  • Loading branch information
andiricum2 committed Sep 4, 2023
1 parent 72a5b4e commit 354ca97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions piemc/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def check_for_updates():
if releases:
latest_release = releases[0]
latest_version = latest_release["tag_name"]
latest_date = datetime.strptime(latest_release["published_at"], "%Y-%m-%dT%H:%M:%SZ")
latest_date = datetime.strptime(latest_release["published_at"], "%Y-%m-%d")

version_file = Path(Path(__file__).parent, "version.dat")
if version_file.exists():
with open(version_file, "r") as file:
current_date_str = file.read().strip()
current_date = datetime.strptime(current_date_str, "%Y-%m-%dT%H:%M:%SZ")
current_date = datetime.strptime(current_date_str, "%Y-%m-%d")
else:
current_date = datetime(1970, 1, 1) # A default date for initial comparison

Expand Down
2 changes: 1 addition & 1 deletion version.dat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-08-02T15:20:00Z
2023-09-04

0 comments on commit 354ca97

Please sign in to comment.