Skip to content

Commit 034c20c

Browse files
committed
allow nameless fallback for git describe
1 parent 6ca0210 commit 034c20c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/generators/util_generators/version_string_generator.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ def get_git_version(self) -> str:
2121
version_short = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'], cwd=working_directory).decode(
2222
'ascii'
2323
).strip()
24-
25-
# version_description = subprocess.check_output(
26-
# ['git', 'describe', '--tag', '--dirty'],
27-
# cwd=working_directory
28-
# ).decode('ascii').strip()
29-
# print('Git versions:', '\n', version_description, '\n', version_short, '\n', version_long, '\n')
30-
31-
print('Git versions:', '\n', version_short, '\n', version_long, '\n')
24+
version_description = subprocess.check_output(
25+
['git', 'describe', '--tag', '--dirty', '--always'],
26+
cwd=working_directory
27+
).decode('ascii').strip()
28+
print('Git versions:', '\n', version_description, '\n', version_short, '\n', version_long, '\n')
3229
return version_long
3330

3431
def obtain_version_string(self):

0 commit comments

Comments
 (0)