1
0
Fork 0

autoupdate_app_sources: do not rely on REPO_APPS_ROOT

This commit is contained in:
Félix Piédallu 2024-08-13 08:43:21 +02:00 committed by Salamandar
parent 109bbd27f2
commit 3959147809

View file

@ -29,13 +29,13 @@ from rest_api import (
) # noqa: E402,E501 pylint: disable=import-error,wrong-import-position ) # noqa: E402,E501 pylint: disable=import-error,wrong-import-position
import appslib.logging_sender # noqa: E402 pylint: disable=import-error,wrong-import-position import appslib.logging_sender # noqa: E402 pylint: disable=import-error,wrong-import-position
from appslib.utils import ( from appslib.utils import (
REPO_APPS_ROOT,
get_catalog, get_catalog,
) # noqa: E402 pylint: disable=import-error,wrong-import-position ) # noqa: E402 pylint: disable=import-error,wrong-import-position
from app_caches import ( from app_caches import (
app_cache_folder, app_cache_folder,
) # noqa: E402 pylint: disable=import-error,wrong-import-position ) # noqa: E402 pylint: disable=import-error,wrong-import-position
TOOLS_DIR = Path(__file__).resolve().parent.parent
STRATEGIES = [ STRATEGIES = [
"latest_github_release", "latest_github_release",
@ -62,19 +62,19 @@ def get_github() -> tuple[
]: ]:
try: try:
github_login = ( github_login = (
(REPO_APPS_ROOT / "tools" / ".github_login") (TOOLS_DIR / ".github_login")
.open("r", encoding="utf-8") .open("r", encoding="utf-8")
.read() .read()
.strip() .strip()
) )
github_token = ( github_token = (
(REPO_APPS_ROOT / "tools" / ".github_token") (TOOLS_DIR / ".github_token")
.open("r", encoding="utf-8") .open("r", encoding="utf-8")
.read() .read()
.strip() .strip()
) )
github_email = ( github_email = (
(REPO_APPS_ROOT / "tools" / ".github_email") (TOOLS_DIR / ".github_email")
.open("r", encoding="utf-8") .open("r", encoding="utf-8")
.read() .read()
.strip() .strip()