From 13a1c3374cf08ab68a8fec75e3176693f46120f3 Mon Sep 17 00:00:00 2001 From: CoolCoderCarl <123qwekir2wl@gmail.com> Date: Fri, 10 Jun 2022 01:22:38 +0300 Subject: [PATCH 1/3] Update butler.py --- butler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butler.py b/butler.py index 5d660d1..7e448ec 100644 --- a/butler.py +++ b/butler.py @@ -8,7 +8,7 @@ from zipfile import ZipFile # Archive extensions to exclude when archiving -archives_extension = [".zip", ".7z", ".gz", ".bz", ".gzip", ".bzip", ".iso"] +archives_extension = [".zip", ".7z", ".gz", ".bz", ".gzip", ".bzip", ".iso", ".rar"] def get_args(): From 732528a8194440df43d97747ea33fd45863579d9 Mon Sep 17 00:00:00 2001 From: CoolCoderCarl <123qwekir2wl@gmail.com> Date: Wed, 15 Jun 2022 23:02:34 +0300 Subject: [PATCH 2/3] Update release.yaml --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 217f535..09bb980 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,7 @@ name: Release on: - push: + pull_request: branches: [ main ] paths-ignore: - 'README.md' From c506043dc0f009eb063a08287eec9ebe08f2bbcd Mon Sep 17 00:00:00 2001 From: CoolCoderCarl <123qwekir2wl@gmail.com> Date: Wed, 15 Jun 2022 23:10:26 +0300 Subject: [PATCH 3/3] Fixes exit to 0 while no problem --- butler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/butler.py b/butler.py index 7e448ec..95bda0f 100644 --- a/butler.py +++ b/butler.py @@ -152,7 +152,7 @@ def get_files_extension(path_to_dir: str, special_ext="") -> Set: list_dir = os.listdir(path_to_dir) if len(list_dir) == 0: - exit(1) + exit(0) files = [file for file in list_dir if os.path.isfile(path_to_dir + file)] result = [] @@ -180,7 +180,7 @@ def get_files_to_combine(path_to_dir: str, special_files_extensions: str) -> Set list_dir = os.listdir(path_to_dir) if len(list_dir) == 0: - exit(1) + exit(0) files = [file for file in list_dir if os.path.isfile(path_to_dir + file)] @@ -235,7 +235,7 @@ def clean_the_dir(path_to_clean: str): else: if len(os.listdir(path_to_clean)) == 0: delete_empty_dir(namespace.force, namespace.source) - exit(1) + exit(0) else: for filename in os.listdir(path_to_clean): path = os.path.join(path_to_clean, filename) @@ -284,7 +284,7 @@ def create_archive(dir_to_archive: str): exit(1) else: if len(os.listdir(dir_to_archive)) == 0: - exit(1) + exit(0) else: with ZipFile(str(date_time) + ".zip", "w") as zip_obj: for folder_name, sub_folders, filenames in os.walk(dir_to_archive):