From fdf78f8d13b7c3a25755bfe4bf353130b01a67b2 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Mon, 7 Jul 2025 01:18:51 +0200 Subject: [PATCH] quick update not sure if it even works --- modules/globalvars.py | 2 +- modules/version.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/globalvars.py b/modules/globalvars.py index cb44ae5..1226cc3 100644 --- a/modules/globalvars.py +++ b/modules/globalvars.py @@ -37,7 +37,7 @@ arch = platform.machine() slash_commands_enabled = True # 100% broken, its a newer enough version so its probably enabled by default.... fix this at somepoint or hard code it in goober central code launched = False latest_version = "0.0.0" -local_version = "2.0.0" +local_version = "2.0.1" os.environ['gooberlocal_version'] = local_version REACT = os.getenv("REACT") beta = False # this makes goober think its a beta version, so it will not update to the latest stable version or run any version checks diff --git a/modules/version.py b/modules/version.py index 9fafcac..ce38d98 100644 --- a/modules/version.py +++ b/modules/version.py @@ -4,6 +4,8 @@ import requests import subprocess import sys +launched = False + # Run a shell command and return its output def run_cmd(cmd): result = subprocess.run(cmd, shell=True, capture_output=True, text=True) @@ -17,6 +19,8 @@ def is_remote_ahead(branch='main', remote='origin'): # Automatically update the local repository if the remote is ahead def auto_update(branch='main', remote='origin'): + if launched == True: + return if launched == True: print(_("already_started")) return @@ -48,7 +52,7 @@ def get_latest_version_info(): def check_for_update(): if ALIVEPING != "True": return - global latest_version, local_version + global latest_version, local_version, launched latest_version_info = get_latest_version_info() if not latest_version_info: @@ -80,4 +84,5 @@ def check_for_update(): elif local_version == latest_version: print(f"{GREEN}{_('latest_version')} {local_version}{RESET}") print(f"{_('latest_version2').format(VERSION_URL=VERSION_URL)}\n\n") + launched = True return latest_version \ No newline at end of file