btclock_v3/scripts/git_rev.py

8 lines
164 B
Python
Raw Normal View History

2023-11-07 20:26:15 +00:00
import subprocess
revision = (
subprocess.check_output(["git", "rev-parse", "HEAD"])
.strip()
.decode("utf-8")
)
print("'-DGIT_REV=\"%s\"'" % revision)