feat(preset): add gitea preset
test / test (push) Successful in 2m20s

This commit is contained in:
2026-10-03 16:34:32 +03:00
parent 244f995490
commit b459eef34b
8 changed files with 106 additions and 31 deletions
+13
View File
@@ -1,3 +1,9 @@
import os
from pathlib import Path
import dotenv
def merge_dicts(target: dict, enhancer: dict) -> dict:
for key, val in enhancer.items():
if key not in target:
@@ -9,3 +15,10 @@ def merge_dicts(target: dict, enhancer: dict) -> dict:
else:
target[key] = val
return target
def get_environ(path: Path) -> dict[str, str]:
result = os.environ.copy()
if (env_file := path / ".env").exists():
result.update(dotenv.dotenv_values(env_file))
return result