Skip to content

Commit fe4182c

Browse files
committed
Strip any local part of the tag from the version when guessing the next version. Fixes #126.
1 parent 7f31693 commit fe4182c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

setuptools_scm/version.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,17 @@ def meta(tag, distance=None, dirty=False, node=None, **kw):
8888

8989

9090
def guess_next_version(tag_version, distance):
91-
version = str(tag_version)
91+
version = _strip_local(str(tag_version))
9292
bumped = _bump_dev(version) or _bump_regex(version)
9393
suffix = '.dev%s' % distance
9494
return bumped + suffix
9595

9696

97+
def _strip_local(version_string):
98+
public, sep, local = version_string.partition('+')
99+
return public
100+
101+
97102
def _bump_dev(version):
98103
if '.dev' not in version:
99104
return

0 commit comments

Comments
 (0)