Skip to content

Commit 7702ebd

Browse files
committed
Follow first parent on merge commits
If a bugfix release is merged into main, git describe might use the release tag instead of the X-dev tag. During development, we always want it to use the X-dev tag, however.
1 parent bdd3ab2 commit 7702ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def git_describe_to_python_version(version):
7878
try:
7979
# get version from git describe
8080
proc = subprocess.Popen(
81-
["git", "describe", "--tags"],
81+
["git", "describe", "--tags", "--first-parent"],
8282
stdout=subprocess.PIPE,
8383
stderr=subprocess.PIPE,
8484
)

0 commit comments

Comments
 (0)