We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 172195e commit d2bb981Copy full SHA for d2bb981
tools/pre_build_script.py
@@ -21,6 +21,7 @@
21
22
import sys
23
import os
24
+import re
25
import argparse
26
from subprocess import check_output, CalledProcessError
27
@@ -63,8 +64,9 @@ def generate_version_file(version_git_dir):
63
64
# Get the git description.
65
print("#> Getting git description")
66
try:
- git_description = check_output("git describe HEAD --always --tags", shell=True)
67
+ git_description = check_output("git describe HEAD --always --tags --long", shell=True)
68
git_description = git_description.decode().strip()
69
+ git_description = re.sub(r'-0-g([0-9a-f]+)$', r'-g\1', git_description)
70
except:
71
print("#> ERROR: Failed to get git description, do you have git.exe in your PATH environment variable?")
72
return 1
0 commit comments