Skip to content

Commit

Permalink
Add bumpversion config
Browse files Browse the repository at this point in the history
Also disable end-of-file pre-commit checks, as bumpversion adds a
newline, see c4urself/bump2version#58.
  • Loading branch information
jbweston committed Nov 12, 2019
1 parent 2890236 commit 5cff9a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .bumpversion.cfg
@@ -0,0 +1,23 @@
[bumpversion]
current_version = 0.1.0.dev0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = prod
first_value = dev
values =
dev
prod

[bumpversion:part:build]

[bumpversion:file:qsim/__init__.py]

[bumpversion:file:CHANGELOG.md]
search = ## [unreleased]
replace = ## [{new_version}]
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -8,7 +8,9 @@ repos:
rev: v2.1.0
hooks:
- id: end-of-file-fixer
exclude: '.bumpversion.cfg'
- id: trailing-whitespace
exclude: '.bumpversion.cfg'
# Disable this until 3.8.0 is released (as explained in
# https://gitlab.com/pycqa/flake8/issues/450)
#- repo: https://gitlab.com/pycqa/flake8
Expand Down

0 comments on commit 5cff9a3

Please sign in to comment.