Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a7d297

Browse files
committed
Add .bumpversion
Configuration based from gh:bumpversion:issues:77#issuecomment-130696156 Usage: bumpversion major -> increases major and adds `dev` if not present bumpversion minor -> increases minor and adds `dev` if not present bumpversion release -> drop the `dev` portion
1 parent 928717d commit 5a7d297

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.bumpversion.cfg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[bumpversion]
2+
current_version = 2.3.0.dev1
3+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
4+
serialize =
5+
{major}.{minor}.{patch}.{release}{dev}
6+
{major}.{minor}.{patch}
7+
8+
[bumpversion:part:release]
9+
optional_value = dummy
10+
values =
11+
dev
12+
dummy
13+
14+
[bumpversion:part:dev]
15+
16+
[bumpversion:file:setup.py]
17+
18+
[bumpversion:file:conda.recipe/meta.yaml]
19+
20+
[bumpversion:file:src/runtime/resources/clr.py]
21+
22+
[bumpversion:file:src/SharedAssemblyInfo.cs]
23+
serialize =
24+
{major}.{minor}.{patch}
25+
26+
[bumpversion:file:src/clrmodule/ClrModule.cs]
27+
serialize =
28+
{major}.{minor}.{patch}
29+

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ indent_size = 2
2222
# Solution
2323
[*.sln]
2424
indent_style = tab
25+
26+
# bumpversion reformats itself after every bump
27+
[.bumpversion.cfg]
28+
trim_trailing_whitespace = false
29+
indent_style = tab

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# [bumpversion] comments. bumpversion deleted all comments on its file.
12
# Don't combine `.bumpversion.cfg` with `setup.cfg`. Messes up formatting.
3+
# Don't use `first_value = 1`. It will break `release` bump
4+
# Keep `optional = dummy` needed to bump to release.
5+
# See: https://github.com/peritus/bumpversion/issues/59
26

37
[tool:pytest]
48
xfail_strict = True

0 commit comments

Comments
 (0)