BAPSicle/package.py

29 lines
834 B
Python
Raw Permalink Normal View History

# BAPSicle Details
from json import loads
from helpers.os_environment import resolve_local_file_path
with open(resolve_local_file_path("package.json")) as file:
config = loads(file.read())
NAME: str = config["name"]
NICE_NAME: str = config["nice_name"]
DESCRIPTION: str = config["description"]
AUTHOR: str = config["author"]
LICENSE: str = config["license"]
build_commit = "Dev"
2021-04-27 20:48:17 +00:00
build_branch = "Local"
build_beta = True
try:
import build
2021-09-11 15:49:08 +00:00
build_commit = build.BUILD
2021-04-27 20:48:17 +00:00
build_branch = build.BRANCH
2021-09-11 15:49:08 +00:00
build_beta = build_branch != "release"
except (ModuleNotFoundError, AttributeError):
pass
BUILD: str = build_commit
2021-04-27 20:48:17 +00:00
BRANCH: str = build_branch
BETA: bool = build_beta
VERSION: str = config["version"] + "b" if BETA else config["version"]