forked from Sjyhne/MapAI-Competition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_latest_version.py
More file actions
19 lines (14 loc) · 856 Bytes
/
check_latest_version.py
File metadata and controls
19 lines (14 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import yaml
import requests
url = "https://raw.githubusercontent.com/Sjyhne/MapAI-Competition/master/version.yaml"
newest_version = yaml.load(requests.get(url, allow_redirects=True).content, yaml.Loader)["version"]
current_version = yaml.load(open("version.yaml", "r"), yaml.Loader)["version"]
print("You're currently at version:", current_version)
print("Newest version available:", newest_version)
print()
if current_version == newest_version:
print("Great, you're up to date!")
else:
print("!--------------------------------------------------------------------------------------------------------!")
print("!Please update to newest version. See readme in GitHub for instructions on updating to the latest version!")
print("!--------------------------------------------------------------------------------------------------------!")