Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bumpversion command adds a newline in bumpversion.cfg

See original GitHub issue

I am using pre-commit and one of the hooks I use is is end-of-line-fixer:

end-of-file-fixer - Makes sure files end in a newline and only a newline.

This seems to be causing issues to bump2version. More specifically, bump2version seems to be adding an extra empty line at the end of .bumpversion.cfg which make the hook to fail. As a result, the commit is being aborted.

Is that extra line necessary?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

avilatoncommented, Jan 22, 2019

I used the exclude field to get around this

-   repo:
    rev: v1.2.3
    -   id: trailing-whitespace
    -   id: end-of-file-fixer
        exclude: '.bumpversion.cfg'
kylucacommented, Oct 31, 2019

Opened a new PR heavily inspired by the previous ones here, full credit to the previous authors 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

bump2version - PyPI
Hopefully we can merged back into the original bumpversion and carry on development there. -- A small command line tool to simplify releasing...
Read more >
Versioning using bumpversion - William Hayes, PhD
Bumpversion (use bump2version instead — it installs a command called bumpversion) is a python-based tool that you can use to manage semantic versioning...
Read more >
Commit - pytg - f3595dc1b65a02374ac75fc5d42f75cdb51e04ae
.bumpversion.cfg ... + [bumpversion:file:pytg/] ... + - Added `` example to show the simplest way to just send a message.
Read more >
bump2version Changelog -
Added : way to only bump a specified file via --no-configured-files, ... Fix the spurious newline that bump2version adds when writing to bumpversion.cfg, ......
Read more >
Changes · Versions and Tag Management · Wiki · ecs / ELT SW ...
Waf and ELT DevEnv provide some support, and more will be probably added in the future. # `.bumpversion.cfg`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found