Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 578389c

Browse files
committed
Set up bumpversion in setup.py.
1 parent 07ada6a commit 578389c

File tree

4 files changed

+20
-25
lines changed

4 files changed

+20
-25
lines changed

.bumpversion.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[bumpversion]
2+
current_version = 2.0.0rc
3+
commit = True
4+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>.*))?
5+
serialize =
6+
{major}.{minor}.{patch}{release}
7+
{major}.{minor}.{patch}
8+
tag_name = {new_version}
9+
10+
[bumpversion:part:release]
11+
optional_value = production
12+
values =
13+
rc
14+
production
15+
16+
[bumpversion:file:setup.py]
17+
[bumpversion:file:src/pydocstyle/utils.py]

setup.cfg

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,2 @@
1-
[bumpversion]
2-
current_version = 2.0.0rc
3-
commit = True
4-
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>.*))?
5-
serialize =
6-
{major}.{minor}.{patch}{release}
7-
{major}.{minor}.{patch}
8-
91
[wheel]
102
universal = 1
11-
12-
[bumpversion:part:release]
13-
optional_value = production
14-
values =
15-
rc
16-
production
17-
18-
[bumpversion:file:src/pydocstyle/utils.py]
19-

setup.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22
import os
33
from setuptools import setup
44

5-
6-
this_dir = os.path.dirname(__file__)
7-
8-
with open(os.path.join(this_dir, 'src', 'pydocstyle', 'utils.py')) as f:
9-
for line in f:
10-
if line.startswith('__version__'):
11-
version = eval(line.split('=')[-1])
12-
5+
# Do not update the version manually - it is managed by `bumpversion`.
6+
version = '2.0.0rc'
137

148
setup(
159
name='pydocstyle',

src/pydocstyle/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from itertools import izip_longest as zip_longest
88

99

10+
# Do not update the version manually - it is managed by `bumpversion`.
1011
__version__ = '2.0.0rc'
1112
log = logging.getLogger(__name__)
1213

0 commit comments

Comments
 (0)