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
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?
The text was updated successfully, but these errors were encountered:
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
orprepatch
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 version1.2.0
with the latest tagmyapp-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 aminor
one due to the previous commits. It ignores the manually setpremajor
. The only way to "fix" this for me would be to addreleaseAs=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 therelease
version viareleaseAs
anymore as the release version should always match the pre-release version.Or is there another way (currently) to achieve my goal?
The text was updated successfully, but these errors were encountered: