ci: add CCMA release builds

This commit is contained in:
Marcel Peterkau
2026-06-23 20:19:53 +02:00
parent 302170230a
commit 0e3087a780
16 changed files with 842 additions and 24 deletions
+2 -12
View File
@@ -71,7 +71,7 @@ class AppConfig:
def config_directory() -> Path:
override = os.environ.get("CCMA_CONFIG_DIR") or os.environ.get("C3MA_CONFIG_DIR")
override = os.environ.get("CCMA_CONFIG_DIR")
if override:
return Path(override).expanduser()
if os.name == "nt":
@@ -81,11 +81,7 @@ def config_directory() -> Path:
def load_config() -> AppConfig:
path = config_directory() / "config.json"
if not path.exists() and not (os.environ.get("CCMA_CONFIG_DIR") or os.environ.get("C3MA_CONFIG_DIR")):
legacy_path = _legacy_config_directory() / "config.json"
if legacy_path.exists():
path = legacy_path
store_override = os.environ.get("CCMA_STORE") or os.environ.get("C3MA_STORE", "")
store_override = os.environ.get("CCMA_STORE", "")
if not path.exists():
return AppConfig(store_path=store_override)
try:
@@ -113,12 +109,6 @@ def load_config() -> AppConfig:
return AppConfig(store_path=store_override)
def _legacy_config_directory() -> Path:
if os.name == "nt":
return Path(os.environ.get("APPDATA", Path.home())) / "C3MA"
return Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config")) / "c3ma"
def _non_negative_float(value: object, default: float) -> float:
try:
parsed = float(value)