Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release does not consider prerelease tags #808

Open
sidyes opened this issue May 2, 2024 · 0 comments
Open

release does not consider prerelease tags #808

sidyes opened this issue May 2, 2024 · 0 comments

Comments

@sidyes
Copy link

sidyes commented May 2, 2024

Due to the changes in #433 pre-release tags are ignored when getting the target release version.

Problem

If a prelease is started using the --releaseAs=prerelease parameter then it is fine as it takes the previous commits into account to identify the correct version.
If a prerelease is started using premajor, preminor or prepatch then it might lead to (in my opinion) wrong release versions when performing the actual release.

Example

Let's assume an app named myapp having the version target and the current version 1.2.0 with the latest tag myapp-v.1.2.0

In the next step we want to create a new premajor release candidate:
nx run myapp:version --releaseAs=premajor --preid=rc
This leads to a new prerelease tag myapp-v.2.0.0-rc.0

Next, we add a few changes/commits and perform another prerelease:
nx run myapp:version --releaseAs=prerelease
This leads to a new prerelease tag myapp-v.2.0.0-rc.1.

Finally, we create a new release:
nx run myapp:version
This leads to a new release tag myapp-v.1.3.0 because it identifies the release to be a minor one due to the previous commits. It ignores the manually set premajor. The only way to "fix" this for me would be to add releaseAs=major to my command.

Expected Behavior

It should be a configurable option whether prerelease tags should be considered for getting the release version to support my scenario so that I do not have to specify the release version via releaseAs anymore as the release version should always match the pre-release version.
Or is there another way (currently) to achieve my goal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant