From 48bb558549b426b5d3c3f777ac87aae453d84bcd Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Wed, 16 Jul 2025 00:01:27 +0200 Subject: [PATCH] automatic brah --- modules/globalvars.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/globalvars.py b/modules/globalvars.py index 00cb139..f6d572b 100644 --- a/modules/globalvars.py +++ b/modules/globalvars.py @@ -2,6 +2,16 @@ import os import platform from dotenv import load_dotenv import pathlib +import subprocess +def get_git_branch(): + try: + branch = subprocess.check_output( + ["git", "rev-parse", "--abbrev-ref", "HEAD"], + stderr=subprocess.DEVNULL + ).decode('utf-8').strip() + return branch + except subprocess.CalledProcessError: + return None env_path = pathlib.Path(__file__).parent.parent / '.env' load_dotenv(dotenv_path=env_path) @@ -42,5 +52,7 @@ latest_version = "0.0.0" local_version = "2.3.0" 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 +if get_git_branch() == "dev": + beta = True + # this makes goober think its a beta version, so it will not update to the latest stable version or run any version checks \ No newline at end of file