jscutlery / semver

Nx plugin to automate semantic versioning and CHANGELOG generation.
MIT License
719 stars 83 forks source link

prerelease tags being set on the wrong commits #826

Open carlofaessler opened 1 month ago

carlofaessler commented 1 month ago

I have a strange situation since upgrading from 2.29.3 to 4.2.0.

We are using conventional commits and I made a fix: commit in a library which is a dependency of other libraries and apps in our monorepo.

In Gitlab the CI/CD pipeline runs semver on all affected to determine and set the next tag. This seems to correctly identify which projects should be tagged and also the tags determined by semver are correct.

The library is tagged correctly on the commit where I made the change. However, the tags for the projects that depend on the library are all over the place. The pattern seems to be that the last commit that made any changes to each project is tagged. My expectation would be that all projects are tagged on the commit I made with the change to the library which affects all these projects.

I've read the documentation about 10 times, looked for breaking changes, found out that trackDeps has changed slightly so I updated our nx.json accordingly but nothing I tried so far is fixing this issue. Am at my whits end, hope someone is familiar with this issue and is able to help.

carlofaessler commented 4 weeks ago

After upgrading to 5.2.2 with nx at 19.2 one of the problems went away. Old commits are no longer re-tagged. Currently only the directly changed projects are tagged but other projects depending on the changed projects are still not tagged. They show up in the output with the message Nothing changed since last release

carlofaessler commented 4 weeks ago

So I guess this is now a duplicate of https://github.com/jscutlery/semver/issues/785