From b33ea279168b0db6fcba1d707bba7c7c80b30bae Mon Sep 17 00:00:00 2001 From: Pbatch <37177749+Pbatch@users.noreply.github.com> Date: Wed, 19 Jun 2024 23:22:35 +0100 Subject: [PATCH] Save debug output with updating (#156) --- clashroyalebuildabot/updater.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/clashroyalebuildabot/updater.py b/clashroyalebuildabot/updater.py index a6010c1..f8042d5 100644 --- a/clashroyalebuildabot/updater.py +++ b/clashroyalebuildabot/updater.py @@ -6,6 +6,8 @@ from loguru import logger import requests +from clashroyalebuildabot.constants import DEBUG_DIR + class Updater: GITHUB_REPO = "Pbatch/ClashRoyaleBuildABot" @@ -55,7 +57,14 @@ def _replace_old_version(self, commit_sha): ) for item in os.listdir(self.EXTRACT_PATH): item_path = os.path.join(self.EXTRACT_PATH, item) - if item in {new_folder_name, "bot.log", ".git"}: + if item in { + new_folder_name, + DEBUG_DIR, + os.path.join(DEBUG_DIR, "bot.log"), + os.path.join(DEBUG_DIR, "screenshots"), + os.path.join(DEBUG_DIR, "labels"), + ".git", + }: continue if os.path.isdir(item_path):