()
| 5 | |
| 6 | |
| 7 | def get_git_short_hash() -> str: |
| 8 | try: |
| 9 | result = subprocess.run( |
| 10 | ["git", "rev-parse", "--short=8", "HEAD"], |
| 11 | check=True, |
| 12 | capture_output=True, |
| 13 | text=True, |
| 14 | ) |
| 15 | return result.stdout.strip() |
| 16 | except Exception: |
| 17 | return "nogit" |
| 18 | |
| 19 | |
| 20 | def main() -> int: |