mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
Fix git_hash function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
706cbd3872
commit
fa0bd4f789
|
@ -76,7 +76,8 @@ GPROF=False
|
|||
|
||||
def git_hash():
|
||||
try:
|
||||
r = subprocess.check_output(['git', 'show-ref', '--abbrev=12', 'HEAD'], shell=True).rstrip('\r\n')
|
||||
branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], shell=True).rstrip('\r\n')
|
||||
r = subprocess.check_output(['git', 'show-ref', '--abbrev=12', 'refs/heads/%s' % branch], shell=True).rstrip('\r\n')
|
||||
except:
|
||||
raise MKException("Failed to retrieve git hash")
|
||||
ls = r.split(' ')
|
||||
|
|
Loading…
Reference in a new issue