You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cz bump could not find the latest version tag to do incremental changelog when there is custom tag_format #561
$ git tag
SOME_TAG_PREFIX_1.0.0
$ git log
commit 11ba99fd2907be046e814662e3057c4bdd9f3db0 (HEAD -> master)
Author: Sam SIU <23556929+ssiuhk@users.noreply.github.com>
Date: Fri Aug 19 19:35:08 2022 +0000
feat(Testing): Testing something
commit db20a16f6ed45ef1470b131f65c9006b094c4a58 (tag: SOME_TAG_PREFIX_1.0.0)
Author: Sam SIU <23556929+ssiuhk@users.noreply.github.com>
Date: Fri Aug 19 18:54:18 2022 +0000
First release
$ cz bump --dry-run --changelog
bump: version 1.0.0 → 1.1.0
tag to create: SOME_TAG_PREFIX_1.1.0
increment detected: MINOR
No tag found to do an incremental changelog
Desired behavior
cz bump should identify the custom git tag and create an incremental changelog
$ cz bump --dry-run --changelog
bump: version 1.0.0 → 1.1.0
tag to create: SOME_TAG_PREFIX_1.1.0
increment detected: MINOR
## SOME_TAG_PREFIX_1.1.0 (2022-08-19)
### Feat
- **Testing**: Testing something
@Lee-W Not entirely sure it's the same issue with #463, as per latest comment even without git tag it failed in #463.
For my case it's simple, as illustrated in above report, when the git tag prefix is long, like "SOME_TAG_PREFIX_", the similarity reported will be extremely low "0.38461538461538464" (for "SOME_TAG_PREFIX_1.0.0" vs "1.0.0" in comparison). The fix is simple, just add tag_format in version when calling _find_incremental_rev in command/changelog.py per my PR #566. This will fix the issue of discreprency between looking-up version in custom formatted git taged versions.
Please review.
Activity
Lee-W commentedon Aug 21, 2022
Hi @ssiuhk, I'm afraid I can not reproduce your error. But we do notice we might encounter such issue and have discussion on #463 (comment).
Lee-W commentedon Aug 21, 2022
As these seems to be duplicate issues. I'll close this one for now and let's discuss on that one 👍
fix(command_changelog): Fixed issue commitizen-tools#561 cz bump coul…
ssiuhk commentedon Aug 22, 2022
@Lee-W Not entirely sure it's the same issue with #463, as per latest comment even without git tag it failed in #463.
For my case it's simple, as illustrated in above report, when the git tag prefix is long, like "SOME_TAG_PREFIX_", the similarity reported will be extremely low "0.38461538461538464" (for "SOME_TAG_PREFIX_1.0.0" vs "1.0.0" in comparison). The fix is simple, just add tag_format in version when calling _find_incremental_rev in command/changelog.py per my PR #566. This will fix the issue of discreprency between looking-up version in custom formatted git taged versions.
Please review.
Thanks!
fix(command_changelog): Fixed issue #561 cz bump could not find the l…