Skip to content

Commit 7949907

Browse files
author
Eran Geva
committed
[SW-194599] fix setup.py get_build_version
Change-Id: I22ab530d88a2f37802859a7f3434e6395390566a
1 parent ad0625b commit 7949907

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def get_build_version():
2828
return __version__
2929
try:
3030
result = subprocess.run(["git", "describe", "--tags"], capture_output=True, text=True, check=True)
31-
_, distance, commit = result.stdout.strip().split("-")
31+
distance = result.stdout.strip().split("-")[-2]
32+
commit = result.stdout.strip().split("-")[-1]
3233
return f"{__version__}.dev{distance}+{commit}"
3334
except subprocess.CalledProcessError:
3435
return __version__

0 commit comments

Comments
 (0)