From 1427542ecb23129aebf5a30ceeb2e0f61e54ae09 Mon Sep 17 00:00:00 2001 From: Matt Troutman Date: Wed, 2 Oct 2024 14:31:20 -0500 Subject: [PATCH] =?UTF-8?q?Added=20new=20script=20as=20the=20other=20was?= =?UTF-8?q?=20being=20a=20turd=20=F0=9F=92=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .fontfoldercleanup/git_reset_and_clean.sh | 6 ++++++ .fontfoldercleanup/remove_ds_and_clean_empty_folders.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 .fontfoldercleanup/git_reset_and_clean.sh diff --git a/.fontfoldercleanup/git_reset_and_clean.sh b/.fontfoldercleanup/git_reset_and_clean.sh new file mode 100755 index 0000000..7898bde --- /dev/null +++ b/.fontfoldercleanup/git_reset_and_clean.sh @@ -0,0 +1,6 @@ +#!/bin/zsh +# go to the root of the repository +cd "$(git rev-parse --show-toplevel)" +# reset the repository to the main branch and clean it +git reset --hard main +git clean -fdx -e .env/ -e .idea/ \ No newline at end of file diff --git a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py index f01f9a4..a82da61 100644 --- a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py +++ b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py @@ -3,7 +3,7 @@ import os if __name__ == '__main__': # Clean up git repository - os.system(f"cd {cleanup.repo_location} && git reset --hard main && git clean -fdX") # Change to repo location, reset the repository, and clean untracked files except those in .gitignore + os.system("./git_reset_and_clean.sh") # Change to repo location, reset the repository, and clean untracked files except those in .gitignore cleanup.remove_ds_store_files() # Remove .DS_Store files from the repository cleanup.remove_setup_complete_files() # Remove setup complete files from the repository cleanup.remove_empty_folders() # Remove empty folders from the repository \ No newline at end of file