-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Description
I would like to propose (and integrate) a prerelease option, to create releases with version numbers like 1.0.0-alpha.0, 1.0.0-rc.0, etc.
Use cases
Publishing alpha/beta/rc versions can be really helpful when working with multiple repositories or to preview (and test) new features.
Possible implementation
I would propose following implementation:
- new cli option
--prerelease=<str>, if the prerelease option is there but has no value it defaults torc - the new version number is determined as follows (if called with
prerelease):- last version was a normal one -> normal version bump and prerelease bump:
1.0.0+feat+fixwill result in1.1.0-rc.0 - last version was a
prereleaseand no commits which would bump the version were made -> prerelease bump
1.0.0+feat+fix=>1.1.0-rc.0+feat+fixresults in1.1.0-rc.1 - last version was a
prereleaseand commits which require a bump were made -> normal version bump and prerelease bump
1.0.0+feat+fix=>1.1.0-rc.0+BREAKING CHANGES+ results in2.0.0-rc.0
- last version was a normal one -> normal version bump and prerelease bump:
As this determination needs information about the last version as well as the last none prerelease version, we would need to integrate a new get_new_prerelese_version function to be called on prereleases.
The current get_new_version needs to be adjusted to ignore prerelease versions to prevent wrong determinations.
Personally I would find this feature really useful and I was glad to have it in the js world before. I would also offer to write the integration :)