3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-06 14:13:23 +00:00

Add option --githash to mk_win_dist

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-30 08:59:36 -08:00
parent b33e144699
commit 27b1f8d1b3
2 changed files with 30 additions and 10 deletions

View file

@ -74,6 +74,16 @@ VS_PAR=False
VS_PAR_NUM=8
GPROF=False
def git_hash():
try:
r = subprocess.check_output(['git', 'show-ref', '--abbrev=12', 'HEAD'], shell=True).rstrip('\r\n')
except:
raise MKException("Failed to retrieve git hash")
ls = r.split(' ')
if len(ls) != 2:
raise MKException("Unexpected git output")
return ls[0]
def is_windows():
return IS_WINDOWS