script maintenance
This commit is contained in:
parent
d6aa9cf4c8
commit
339cd33dd6
3 changed files with 7 additions and 3 deletions
|
|
@ -2,9 +2,10 @@ import font_folder_cleanup
|
|||
import os
|
||||
|
||||
def git_cleanup():
|
||||
os.system("cd $(git rev-parse --show-toplevel)")
|
||||
os.system("git reset --hard")
|
||||
os.system("git clean -fdx -e .env/ -e .idea/ -e .fontfoldercleanup/")
|
||||
os.system("cd $(git rev-parse --show-toplevel) && git stash push -- .fontfoldercleanup/ && git reset --hard && git clean -fdx -e .env/ -e .idea/ -e .fontfoldercleanup/")
|
||||
|
||||
def apply_stash():
|
||||
os.system("cd $(git rev-parse --show-toplevel) && git stash apply")
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Clean up git repository
|
||||
|
|
@ -13,3 +14,4 @@ if __name__ == '__main__':
|
|||
font_folder_cleanup.remove_setup_complete_files() # Remove setup complete files from the repository
|
||||
font_folder_cleanup.remove_empty_folders() # Remove empty folders from the repository
|
||||
git_cleanup() # Clean up git repository again after removing files and folders
|
||||
apply_stash() # Apply the stash to restore the files that were removed
|
||||
Loading…
Add table
Add a link
Reference in a new issue