Skip to content

Commit 4886978

Browse files
committed
fix bump2version and pre-commit conflict
1 parent 2660d8a commit 4886978

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ repos:
1111
rev: v4.4.0
1212
hooks:
1313
- id: end-of-file-fixer
14+
exclude: 'setup.cfg'
1415
- id: trailing-whitespace
1516
exclude: ^docs/
1617
- id: check-case-conflict

docs/development_manual.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ bump2version major
3737

3838
```bash
3939
# Add new Version and changelog to History.md
40-
# Commit all changes
40+
# Commit all changes and run
4141
bump2version --tag release
42-
43-
git push
44-
git push --tags
42+
# Check if the tag is present
43+
git tags
44+
# Push the changes to GitHub
45+
git push origin <tag_name>
4546

4647
```
4748

4849
- eg: 0.1.1-dev0 to 0.1.1
49-
- To trigger Travis CI build
50+
- To trigger GitHub Actions to push to PyPi
5051
- Tags are created
5152

5253
# Revert Version and Delete a Tag

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ current_version = 1.0.0
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
6-
serialize =
6+
serialize =
77
{major}.{minor}.{patch}-{release}{build}
88
{major}.{minor}.{patch}
9-
9+
message = [skip actions] Bump version: {current_version} → {new_version}
1010
[bumpversion:part:release]
1111
optional_value = prod
1212
first_value = dev
13-
values =
13+
values =
1414
dev
1515
prod
1616

@@ -38,5 +38,5 @@ test = pytest
3838

3939
[tool:pytest]
4040
collect_ignore = ['setup.py']
41-
addopts =
41+
addopts =
4242
--color=yes

0 commit comments

Comments
 (0)