Updated worflow

This commit is contained in:
Antoine Nguyen
2024-04-24 07:18:56 +02:00
parent c9a2f260da
commit fb961f9339
2 changed files with 16 additions and 12 deletions

View File

@@ -14,14 +14,18 @@ def check_version():
with urlopen("https://raw.githubusercontent.com/modoboa/modoboa-installer/master/version.txt") as r_version:
remote_version = r_version.read().decode()
if local_version == "" or remote_version == "":
utils.printcolor("Could not check that your installer is up to date: "
f"local version: {local_version}, "
f"remote version: {remote_version}",
utils.YELLOW)
utils.printcolor(
"Could not check that your installer is up-to-date: "
f"local version: {local_version}, "
f"remote version: {remote_version}",
utils.YELLOW
)
if remote_version != local_version:
utils.error("Your installer seems outdated.\n"
"Check the README for instruction on how to update.\n"
"No support will be provided without an up to date installer!")
utils.error(
"Your installer seems outdated.\n"
"Check README file for instructions about how to update.\n"
"No support will be provided without an up-to-date installer!"
)
answer = utils.user_input("Continue anyway? (Y/n) ")
if not answer.lower().startswith("y"):
sys.exit(0)