automatic brah

This commit is contained in:
WhatDidYouExpect 2025-07-16 00:01:27 +02:00
parent 73185f8708
commit 48bb558549

View file

@ -2,6 +2,16 @@ import os
import platform import platform
from dotenv import load_dotenv from dotenv import load_dotenv
import pathlib 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' env_path = pathlib.Path(__file__).parent.parent / '.env'
load_dotenv(dotenv_path=env_path) load_dotenv(dotenv_path=env_path)
@ -42,5 +52,7 @@ latest_version = "0.0.0"
local_version = "2.3.0" local_version = "2.3.0"
os.environ['gooberlocal_version'] = local_version os.environ['gooberlocal_version'] = local_version
REACT = os.getenv("REACT") 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