OrangeBTClock/scripts/git_rev.py
2024-03-17 02:15:59 +01:00

8 lines
No EOL
164 B
Python

import subprocess
revision = (
subprocess.check_output(["git", "rev-parse", "HEAD"])
.strip()
.decode("utf-8")
)
print("'-DGIT_REV=\"%s\"'" % revision)