Skip to content

Commit ea1d81e

Browse files
fix #292 - support for uppercase leading v character in tag version extraction regex
1 parent 7d35df0 commit ea1d81e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
v3.0.5
2+
3+
* fix #292 - match leading 'V' character as well
4+
5+
https://www.python.org/dev/peps/pep-0440/#preceding-v-character
6+
7+
v3.0.4
8+
=======
9+
10+
* rerelease of 3.0.3 after fixing the release process
11+
112
v3.0.3 (pulled from pypi due to a packaging issue)
213
======
314

src/setuptools_scm/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from .utils import trace
88

9-
DEFAULT_TAG_REGEX = r"^(?:[\w-]+-)?(?P<version>v?\d+(?:\.\d+){0,2}[^\+]+)(?:\+.*)?$"
9+
DEFAULT_TAG_REGEX = r"^(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]+)(?:\+.*)?$"
1010
DEFAULT_VERSION_SCHEME = "version_scheme"
1111

1212

testing/test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
("apache-arrow-0.9.0", "0.9.0"),
1010
("arrow-0.9.0", "0.9.0"),
1111
("arrow-0.9.0-rc", "0.9.0-rc"),
12+
("v1.1", "v1.1"),
13+
("V1.1", "V1.1"),
1214
],
1315
)
1416
def test_tag_regex(tag, expected_version):

0 commit comments

Comments
 (0)