File: post-commit.py

package info (click to toggle)
commitizen 4.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,760 kB
  • sloc: python: 17,069; makefile: 15
file content (20 lines) | stat: -rwxr-xr-x 420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python

try:
    from commitizen.cz.utils import get_backup_file_path
except ImportError as error:
    print(f"could not import commitizen:\n{error}")
    exit(1)


def post_commit() -> None:
    backup_file_path = get_backup_file_path()

    # remove backup file if it exists
    if backup_file_path.is_file():
        backup_file_path.unlink()


if __name__ == "__main__":
    post_commit()
    exit(0)