Open j-choi1 opened 1 week ago
I also noticed for changelog that it'll include the previous release commits. For example:
feat:
and merge develop into master via PR.releaseVersion
fix:
and run printChangeLog
You will see that the feat commit made in step 1 got included but it should not do that. It should only show the fix commit.Hi, This problem you describe is not that easily fixed. It caused by the long lived development branch. The plugin works by walking the tree from the head commit and following the tree into every branch that precedes it. If the plugin find a release commit or tag it stops and return the version. Whit a long living develop branch the plugin finds the 1.1 version from master and 1.0 from develop including feature changes (that were already used to calculate 1.1 but it does not know that). What I can do is to ignore changes that come from branches based on an older version but that would break feature branches based on older versions. So if you are just using main and develop I could add a setting that would make the plugin ignore branches based on older versions?
If you release from master and then merge master into develop, the release commit history carries over to develop so the plugin should know the last release commit version. This is a very big limitation with the plugin that it only works using one branch.
I think I found a better way of elimination duplicate commits.
I changed so the plugin continues scanning commits after a release commit is found and just mark them as read already if there are more than one branch.
The change is included in 0.12.10
release.
Have you by any chance had time to test the latest release? I think it will resolve your issue.
Assume default semver config and we have two branches:
master
anddevelop
master
current version is 1.0.0 anddevelop
is a copy of the master branch.Example 1:
feat:
and merge develop into master via PR.releaseVersion
which will release 1.1.0.fix:
and runprintVersion
which will show 1.2.0.In step 4, shouldn't the version print out 1.1.1?
Example 2:
feat!:
and merge develop into master via PR.releaseVersion
which will release 2.0.0.fix:
and runprintVersion
which will show 3.0.0.In step 4, shouldn't the version print out 2.0.1?