Skip to content

Prerelease option #386

Closed
Closed
@jacksbox

Description

@jacksbox

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 to rc
  • 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 + fix will result in 1.1.0-rc.0
    • last version was a prerelease and no commits which would bump the version were made -> prerelease bump
      1.0.0 + feat + fix => 1.1.0-rc.0 + feat + fix results in 1.1.0-rc.1
    • last version was a prerelease and 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 in 2.0.0-rc.0

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature or a feature requesthelp-wantedExtra attention is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions