Debian Codegraph @

hooks/post-commit.py

raw
1 #!/usr/bin/env python
2
3 try:
4 from commitizen.cz.utils import get_backup_file_path
5 except ImportError as error:
6 print(f"could not import commitizen:\n{error}")
7 exit(1)
8
9
10 def post_commit() -> None:
11 backup_file_path = get_backup_file_path()
12
13 # remove backup file if it exists
14 if backup_file_path.is_file():
15 backup_file_path.unlink()
16
17
18 if __name__ == "__main__":
19 post_commit()
20 exit(0)