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
Allow bump calculate the next version from git log #1374
Currently, when skip commits and no using tags at all (in my use case, I bump the version with each commit) always get a MAYOR bump, but my commit is not a BREAKING CHANGES.
Possible Solution
When sip using tags at all, use the git log to read the commit messages and calculate the next version in bump
Sure, My team use commitizen for the wizard to prepare the commit message, to check the commit message and to do the bump version.
But for the last one we use pre-commit to
rigth now, we force a PATCH bump, because the bump use the tag version to check the last version and calculate what kind of increment to do.
Since we do not use tags, instead would like to use just the kind on commit (breaking change, feat, fix, etc) but those only work when tagging
Of course we are a little taem so a few of dev work over this repo.
I assume you must have a BREAKING CHANGE somewhere or a !. I think there's no way to avoid it because if you don't use tags, then in order to calculate the next version bump, commitizen will scan all the commits, it has no way to know when the last commit was.
Exactly, that's is the reason my proposal is get the last log (or las commit) in terms of we are a little team so the idea is the devs update de versión based in their works, an any issue with the versioning is solved manually (we always make a rebase before make a PR) so, we control the flow of commit over the integration branch. In summary, I want to the devs can to do a solid commit message, and update the version based in the message of those commits. each time they make a commit. the versión conflicts can solve easy while do the rebase.
Maybe this a particular use case and doesn't have sense make this feature
Observing the latest commit to increase the version and avoid tagging
It seems very very niche for us to maintain. Unless we can really provide some valid points, that can be generally applicable to many other teams. What do the other maintainers think? @Lee-W@noirbizarre ?
For me there are a bunch of questions to be answered:
why not use tags?
what do the developers use the version that they create in their development branch for?
what's the point of having a bump per branch? if you publish those pypi (or another), later you may have conflicts.
wouldn't developers have endless rebase conflicts?
Agree with it. But, if we can bump based on a certain commit instead of the last commit, would it be helpful 🤔 If we could use tag to track the latest bumped commit, we probably could use SHA as well. Not using tag is a feature we got asked occasionally, but never got a good proposal on the "how". Maybe storing SHA is one way?
thank tou guys for your time, again, I guess it maybe an special use case because we are a very small team, so we need to bump on each commit, i mean
commit -> new version (we pretended to use cz to bump based in the message BC, feat, fix, etc.
I really appreciate your time, thanks
Activity
Lee-W commentedon Mar 30, 2025
Hi @pablodgonzalez , I don't quite understand. Could you please provide an example for helping us understand? Thanks!
pablodgonzalez commentedon Apr 3, 2025
Sure, My team use commitizen for the wizard to prepare the commit message, to check the commit message and to do the bump version.
But for the last one we use pre-commit to
rigth now, we force a PATCH bump, because the bump use the tag version to check the last version and calculate what kind of increment to do.
Since we do not use tags, instead would like to use just the kind on commit (breaking change, feat, fix, etc) but those only work when tagging
Of course we are a little taem so a few of dev work over this repo.
woile commentedon Apr 3, 2025
Can you share your configuration? Have you tried building your own version provider?
pablodgonzalez commentedon Apr 4, 2025
this is our configuration, I didn't tried with a version provider
woile commentedon Apr 4, 2025
can you share the list of commits?
I assume you must have a
BREAKING CHANGEsomewhere or a!. I think there's no way to avoid it because if you don't use tags, then in order to calculate the next version bump, commitizen will scan all the commits, it has no way to know when the last commit was.pablodgonzalez commentedon Apr 4, 2025
Exactly, that's is the reason my proposal is get the last log (or las commit) in terms of we are a little team so the idea is the devs update de versión based in their works, an any issue with the versioning is solved manually (we always make a rebase before make a PR) so, we control the flow of commit over the integration branch. In summary, I want to the devs can to do a solid commit message, and update the version based in the message of those commits. each time they make a commit. the versión conflicts can solve easy while do the rebase.
Maybe this a particular use case and doesn't have sense make this feature
woile commentedon Apr 4, 2025
I don't see this feature moving forward.
It seems very very niche for us to maintain. Unless we can really provide some valid points, that can be generally applicable to many other teams. What do the other maintainers think? @Lee-W @noirbizarre ?
For me there are a bunch of questions to be answered:
Lee-W commentedon Apr 6, 2025
Agree with it. But, if we can bump based on a certain commit instead of
the last commit, would it be helpful 🤔 If we could use tag to track the latest bumped commit, we probably could use SHA as well. Not using tag is a feature we got asked occasionally, but never got a good proposal on the "how". Maybe storing SHA is one way?pablodgonzalez commentedon Apr 11, 2025
thank tou guys for your time, again, I guess it maybe an special use case because we are a very small team, so we need to bump on each commit, i mean
commit -> new version (we pretended to use cz to bump based in the message BC, feat, fix, etc.
I really appreciate your time, thanks