mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Fix git_hash function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
706cbd3872
commit
fa0bd4f789
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue