Add missing build aux file for obtaining the git version.
This is needed to make commit e8e7139 work for people that are not me.
This commit is contained in:
parent
9f703466aa
commit
eebe498a3e
1 changed files with 16 additions and 0 deletions
16
build-aux/git_version.py
Executable file
16
build-aux/git_version.py
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
version = subprocess.check_output(
|
||||
['git', 'describe', '--all', '--long', '--dirty'],
|
||||
stderr=subprocess.DEVNULL
|
||||
)
|
||||
except:
|
||||
sys.exit(1)
|
||||
|
||||
version = str(version, encoding='UTF-8').strip()
|
||||
print(re.sub(r'^heads\/(.*)-0-(g.*)$', r'\1~\2', version))
|
||||
Loading…
Add table
Add a link
Reference in a new issue