device-epd/git_rev_macro.py

8 lines
167 B
Python
Raw Normal View History

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