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
{{ message }}
Repository navigation
Using shorter versions ( v1.5 ) will add a 0 patch when not desired #292
Description
Updating from v1.3.0 to v1.6.0 I have noticed that the patch version is appended by the patch command if not specified.
As I am using a simplified form of SemVer vX.Y for various projects, this breaks the current workflow.
If this is intended, this should be converted to a feature request to be able to disable this behaviour.
Reproduction Steps
Steps to reproduce the behavior:
Run changie batch v2.5.
What happened v2.5.0.md is created for version v2.5.0.
Expected behavior v2.5.md is created for version v2.5.
Hmm, yes it does seem to be a regression after adding in support for prerelease and meta options. The semver tool uses the .String() method instead of .Original() so it appends a zero patch. I have a fix for this but want to add that if you do changie batch v1.5 --prerelease rc1 the result will include the patch of 0: v1.5.0-rc1 which probably does not affect you but just a special case.
changed the title [-]Enforcing of Patch Version might not be desired[/-][+]Using shorter versions ( v1.5 ) will add a 0 patch when not desired[/+]on Mar 19, 2022
One further point is that this will also allow specifying only major versions, if for whatever reason you wanted to. Such as changie batch v2. It seems like semver requires a minor and patch to exist but I would argue that v1 is just short for v1.0.0 and that v2.5 is short for v2.5.0 anyway. So I will allow it.
Activity
[-]Enforcing of Patch Verson might not be desired[/-][+]Enforcing of Patch Version might not be desired[/+]miniscruff commentedon Mar 19, 2022
Hmm, yes it does seem to be a regression after adding in support for prerelease and meta options. The semver tool uses the
.String()method instead of.Original()so it appends a zero patch. I have a fix for this but want to add that if you dochangie batch v1.5 --prerelease rc1the result will include the patch of 0:v1.5.0-rc1which probably does not affect you but just a special case.v1.6.1 coming up
[-]Enforcing of Patch Version might not be desired[/-][+]Using shorter versions ( v1.5 ) will add a 0 patch when not desired[/+]miniscruff commentedon Mar 19, 2022
One further point is that this will also allow specifying only major versions, if for whatever reason you wanted to. Such as
changie batch v2. It seems like semver requires a minor and patch to exist but I would argue that v1 is just short for v1.0.0 and that v2.5 is short for v2.5.0 anyway. So I will allow it.bephinix commentedon Mar 20, 2022
@miniscruff Thanks, for the fast patch. 💯