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

Fix: _labels_for_format was returning None labels #56

Merged
merged 1 commit into from Oct 22, 2014

Conversation

Projects
None yet
2 participants
@mskrajnowski
Contributor

mskrajnowski commented Sep 16, 2014

If there were any characters after the last label in the serialize string, _labels_for_format would return an extra None label.

Example config file:

[bumpversion:file:bower.json]
parse = "version": "(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"
serialize = "version": "{major}.{minor}.{patch}"
@peritus

This comment has been minimized.

Show comment
Hide comment
@peritus

peritus Oct 22, 2014

Owner

Needs regression test case demonstrating the bug.

Owner

peritus commented Oct 22, 2014

Needs regression test case demonstrating the bug.

@peritus

This comment has been minimized.

Show comment
Hide comment
@peritus

peritus Oct 22, 2014

Owner

Thanks for the pull request, you seem to have a valid case here.

Also thanks for pointing out that I didn't mention the search/replace options in the README. Using these, you should be able to simplify your config as follows (assuming you want to inherit the {major}.{minor}.{patch} defaults):

[bumpversion:file:bower.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"
Owner

peritus commented Oct 22, 2014

Thanks for the pull request, you seem to have a valid case here.

Also thanks for pointing out that I didn't mention the search/replace options in the README. Using these, you should be able to simplify your config as follows (assuming you want to inherit the {major}.{minor}.{patch} defaults):

[bumpversion:file:bower.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

peritus added a commit that referenced this pull request Oct 22, 2014

peritus added a commit that referenced this pull request Oct 22, 2014

Merge pull request #56 from mskrajnowski/master
Fix: _labels_for_format was returning None labels

@peritus peritus merged commit 6296f3c into peritus:master Oct 22, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment