From b61c9410a008e4567554eb87f420cbbdb4f7c3fc Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 5 Jun 2021 08:26:43 +0200 Subject: [PATCH] Drop the apps.json in the cwd --- .gitignore | 1 + bin/abralib.py | 1 - bin/app-json.py | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3b3b4a7f..24fb4167 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.json *.pyc /.venv __pycache__ diff --git a/bin/abralib.py b/bin/abralib.py index a733570b..fa202f58 100644 --- a/bin/abralib.py +++ b/bin/abralib.py @@ -33,7 +33,6 @@ REPOS_TO_SKIP = ( "swarm-cronjob", ) YQ_PATH = Path(f"{HOME_PATH}/.abra/vendor/yq") -SCRIPT_PATH = Path(__file__).absolute().parent log = getLogger(__name__) basicConfig() diff --git a/bin/app-json.py b/bin/app-json.py index ba056ac5..f784ff5a 100755 --- a/bin/app-json.py +++ b/bin/app-json.py @@ -7,7 +7,7 @@ # https://apps.coopcloud.tech from json import dump -from os import chdir, listdir +from os import chdir, getcwd, listdir from os.path import basename from re import findall, search from subprocess import DEVNULL @@ -17,7 +17,6 @@ from requests import get from abralib import ( CLONES_PATH, REPOS_TO_SKIP, - SCRIPT_PATH, YQ_PATH, _run_cmd, clone_all_apps, @@ -198,7 +197,7 @@ def main(): repos_json = get_repos_json() clone_all_apps(repos_json) - target = f"{SCRIPT_PATH}/../deploy/apps.coopcloud.tech/apps.json" + target = f"{getcwd()}/apps.json" with open(target, "w", encoding="utf-8") as handle: dump( generate_apps_json(repos_json),