Skip to content

Allow user to manually specify the next version number #1192

Open
@MicaelJarniac

Description

@MicaelJarniac

Feature Request

Description

It may be useful for some use-cases to allow the user to manually specify the next version number.

Use cases

One such use-case would be the "Epoch SemVer" idea, where the MAJOR version behaves slightly differently in the case of a "notorious" update, increasing by 100 instead of by 1, for example.

Another use-case would be when the repo is in a broken state, and PSR can't figure out what to do. Being able to override the next version entirely would allow the user to get out of these broken states more easily. This would have helped me in #1188, for example.

Possible implementation

semantic-release version --force 1.2.3 to force the next version to be v1.2.3.

This would then check if the provided version isn't lower than the current one, and if valid, bump straight to it.

Alternative solutions

There are flags to force bumps to MINOR, MAJOR, or PATCH, but these will only increase the specified portion by 1, which isn't suitable for all use-cases.

The user could also manually work with Git and such to try to craft a scenario where semantic-release version will have the desired result, but it'd be error-prone and tricky to do.

Another option would be to manually perform all the automated steps PSR would take, but this is once again error-prone and tricky.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedPrevent from becoming stalefeatureA new feature or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions