litex/misoclib/cpu/git.py

7 lines
148 B
Python
Raw Normal View History

2013-11-09 10:38:44 -05:00
import subprocess
2015-04-13 10:47:22 -04:00
2013-11-09 10:38:44 -05:00
def get_id():
output = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii")
return int(output[:8], 16)