Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected issues with the boolean operators in the config file being … #180

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = True
current_version = 1.0.2-dev
current_version = 1.0.3
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
serialize =
{major}.{minor}.{patch}-{release}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
**unreleased**
**v1.0.3**
**v1.0.3-dev**
**v1.0.2-dev**

**v1.0.1**
Expand Down
2 changes: 1 addition & 1 deletion bumpversion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "1.0.2-dev"
__version__ = "1.0.3"
__license__ = "MIT"
__title__ = "bumpversion"
10 changes: 10 additions & 0 deletions bumpversion/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ def _determine_vcs_dirty(possible_vcses, defaults):
try:
vcs.assert_nondirty()
except WorkingDirectoryIsDirtyException as e:
vcs.commit_files_extended = e.message.split('\n')[1:]
if not defaults["allow_dirty"]:
logger.warning(
"%s\n\nUse --allow-dirty to override this if you know what you're doing.",
Expand Down Expand Up @@ -673,6 +674,15 @@ def _commit_to_vcs(files, context, config_file, config_file_exists, vcs, args,
"Would prepare" if not do_commit else "Preparing",
vcs.__name__,
)

if hasattr(vcs, 'commit_files_extended'):
repr = re.compile('^(?P<Action>[A-Z]+\s)(?:\s*.*\s->\s)?(?P<path>.*)$')
for path in vcs.commit_files_extended:
change = repr.match(path).groupdict()
filename = change.get('path').lstrip().rstrip()
if filename not in commit_files:
commit_files.append(filename)

for path in commit_files:
logger.info(
"%s changes in file '%s' to %s",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='bump2version',
version='1.0.2-dev',
version='1.0.3',
url='https://github.com/c4urself/bump2version',
author='Christian Verkerk',
author_email='[email protected]',
Expand Down