From 8f78d7ee773825163ef5c8149d432e1ec370d602 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Sat, 1 Jul 2023 20:55:39 +0700 Subject: [PATCH] fixx --- Dockerfile | 2 +- update.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 51652036..b618177c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,6 @@ ENV HOSTNAME misskaty # Copy Files COPY . . # Instal pip package -RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages +RUN pip3 install -r requirements.txt --break-system-packages # Set CMD Bot CMD ["bash", "start.sh"] diff --git a/update.py b/update.py index 41e7665d..f136d870 100644 --- a/update.py +++ b/update.py @@ -34,7 +34,7 @@ UPSTREAM_REPO_BRANCH = os.environ.get("UPSTREAM_REPO_BRANCH", "") if len(UPSTREAM_REPO_BRANCH) == 0: UPSTREAM_REPO_BRANCH = "master" -if UPSTREAM_REPO is not None and UPSTREAM_BRANCH is not None: +if UPSTREAM_REPO_URL is not None and UPSTREAM_REPO_BRANCH is not None: if os.path.exists('.git'): srun(["rm", "-rf", ".git"]) update = srun([f"git init -q \ @@ -42,11 +42,11 @@ if UPSTREAM_REPO is not None and UPSTREAM_BRANCH is not None: && git config --global user.name YasirArisM \ && git add . \ && git commit -sm update -q \ - && git remote add origin {UPSTREAM_REPO} \ + && git remote add origin {UPSTREAM_REPO_URL} \ && git fetch origin -q \ - && git reset --hard origin/{UPSTREAM_BRANCH} -q"], shell=True) + && git reset --hard origin/{UPSTREAM_REPO_BRANCH} -q"], shell=True) if update.returncode == 0: - logging.info(f'Successfully updated with latest commit branch > {UPSTREAM_BRANCH}') + logging.info(f'Successfully updated with latest commit branch > {UPSTREAM_REPO_BRANCH}') else: - logging.error(f'Something went wrong while updating, check UPSTREAM_REPO if valid or not! return code: {update.returncode}') + logging.error(f'Something went wrong while updating, check UPSTREAM_REPO_URL if valid or not! return code: {update.returncode}') sys.exit(1) \ No newline at end of file