Files
alttpr-python/resources/ci/common/git_clean.py
Mike A. Trethewey 6c484745a2 Keep EnemizerCLI
2020-03-24 01:35:14 -07:00

22 lines
686 B
Python

import subprocess # do stuff at the shell level
def git_clean():
excludes = [
".vscode", # vscode IDE files
".idea", # idea IDE files
"*.json", # keep JSON files for that one time I just nuked all that I was working on, oops
"*app*version.*", # keep appversion files
"EnemizerCLI" # keep EnemizerCLI
]
excludes = ['--exclude={0}'.format(exclude) for exclude in excludes]
# clean the git slate
subprocess.check_call([
"git", # run a git command
"clean", # clean command
"-dfx", # d: directories, f: files, x: ignored files
*excludes])
if __name__ == "__main__":
git_clean()