-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update version regex #47
Update version regex #47
Conversation
Can you elaborate on this? I'm not sure to understand the usefulness of this change. Could you also split the PR in two, since there's a fix and a feat? Thanks! |
Sorry I didn't do that before! Without this (or some equivalent change), running Let's say that running For the second run, But in So none of the version tags match There are other possible fixes. For example, we could instead update I felt the fix here was the easiest, and the user can then decide what to do. ( Given this, do you
|
a28f04e
to
5697cd6
Compare
Thanks, that makes sense! I myself never run One last thing then: could you add some tests please? 🙏 |
5697cd6
to
895ec3b
Compare
Okay, added tests to each commit. |
895ec3b
to
4147b0c
Compare
And I fixed the code-quality checks. |
For repositories which mark versions with a `v` before the version numbers, the `v` needs to be included in the captured version from the changelog, or we won't find a matching version for filtering out already added entries, and they will be duplicated.
Previously, if git-changelog was run twice with bump_latest=True and without tagging a new version in between, the full changelog would be duplicated and written out. This is because the latest version in the CHANGELOG would not match any existing version tags, so no lines would be filtered out before inserting the changelog into the file.
4147b0c
to
f1060ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thanks a lot!
For repositories which mark versions with a
v
before the versionnumbers, the
v
needs to be included in the captured version from thechangelog, or we won't find a matching version for filtering out already
added entries, and they will be duplicated.
Also check if the latest version tag is already part of the changelog.