Skip to content

Commit 303eea2

Browse files
committed
Add
1 parent 1ed862d commit 303eea2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

setuptools_git_versioning.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,22 @@ def get_branch(): # type: () -> Optional[str]
3636
return None
3737

3838

39-
def get_tags(): # type: () -> List[str]
39+
def get_all_tags(): # type: () -> List[str]
40+
tags = _exec("git tag --sort=-version:refname")
41+
if tags:
42+
return tags
43+
return []
44+
45+
46+
def get_branch_tags(): # type: () -> List[str]
4047
tags = _exec("git tag --sort=-version:refname --merged")
4148
if tags:
4249
return tags
4350
return []
4451

4552

4653
def get_tag(): # type: () -> Optional[str]
47-
tags = get_tags()
54+
tags = get_branch_tags()
4855
if tags:
4956
return tags[0]
5057
return None

0 commit comments

Comments
 (0)