From a12912b3bfc242129b3c68134475d3bd7de21c32 Mon Sep 17 00:00:00 2001 From: Matt Troutman Date: Wed, 2 Oct 2024 13:53:56 -0500 Subject: [PATCH] additional cleanup --- .fontfoldercleanup/cleanup.py | 3 ++- .../remove_ds_and_clean_empty_folders.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.fontfoldercleanup/cleanup.py b/.fontfoldercleanup/cleanup.py index d89b338..2bc5ee4 100644 --- a/.fontfoldercleanup/cleanup.py +++ b/.fontfoldercleanup/cleanup.py @@ -1,8 +1,9 @@ import os import time from fileinput import filename +repo_location = '/Users/fishy/custom_fonts' -font_location = '/Users/fishy/custom_fonts/font_files' +font_location = f'{repo_location}/font_files' bad_phrases = [' Free', '-medium', diff --git a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py index 5c09007..608548e 100644 --- a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py +++ b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py @@ -1,10 +1,11 @@ import cleanup +import os if __name__ == '__main__': - ## Clean up git repository - #Reset and remove untracked files - os.system("git reset --hard") - os.system("git clean -fdx") - cleanup.remove_ds_store_files() - cleanup.remove_setup_complete_files() - cleanup.remove_empty_folders() \ No newline at end of file + # Clean up git repository + os.system(f"cd {cleanup.repo_location}") # Pull the latest changes from the remote repository + os.system("git reset --hard main") # Reset the repository to the 'main' branch, discarding all local changes + os.system("git clean -fdx") # Remove all untracked files and directories, including ignored files + 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