litex/misoclib/identifier/git.py
2013-11-09 16:38:44 +01:00

5 lines
141 B
Python

import subprocess
def get_id():
output = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii")
return int(output[:8], 16)