Prereleases of develop branch
Hi and thanks for the work put in this library. I would like to ask what is the best way to cover a certain scenario and see if this is a bug with the lib or a missing config on my side.
The question is around having semver bumping the version as it normally does, but allowing also the prerelease suffix to work with that new version.
Let's say we have 2 branches:
- main
- develop (branch created off main)
Note: the libs in the repo are synced to the same version (using config)
Merging develop into main will trigger semver and release the version accordingly, depending on all of the commits that were in develop at that time. (working properly)
Merges into develop should trigger a beta release (using --releaseAs=prerelease --preid=beta). This part seems to not be working as intended, or at least not together with the general semver guidelines:
- let's say main is on 0.6.1 and the develop just received a "feat" commit. Now considering that develop will go into main and it's current version is that of main, it means that main will be bumped to 0.7.0 when that happens (so that is the version I expect to be the base of the next beta). For this reason running the release cycle on develop (premerge into main )with the options "--releaseAs=prerelease --preid=beta" I would expect that the version on develop gets bumped to 0.7.0-beta.0. Then any following merges into develop (except for maybe breaking changes) would just increment the number after beta. So it would be 0.7.0-beta.1, 0.7.0-beta.2 and so forth.
- When develop would be merged into main, main would be set to 0.7.0, develop reset to new main and a new cycle start
What happens when using the command with -releaseAs is that a patch version bump is created and and -beta.0 added at the end.(even if there are feat there, not just fixes) So it's 0.6.2-beta.0. Merging another feat commit seems to start bumping the beta version by 1 for each lib in repo. So if we have 3 libs, at the end of the second commit into develop we jump from -beta.0 to beta.3 directly.
Any idea why this is happening? Thanks