device-epd/git_rev_macro.py
2020-11-01 16:20:51 +01:00

8 lines
167 B
Python

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