Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Prerelease bump not working in conjunction with NuGet #39

@NightOwl888

Description

@NightOwl888

Great library.

I am having some issues interoperating with NuGet because NuGet expects the pre-release format to be something like.

1.2.3-alpha00003
1.5.9-beta00005
2.8.7-RC1

According to SemVer these are supposed to be supported.

A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.

Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.

But there is a twist with using them in NuGet - you cannot put a . in the pre-release part of the version. I found that you have a preid option that allows you to specify "alpha", etc. but there doesn't seem to be any way to remove the period after the identifier. I guess NuGet is leveraging the fact that the part after the period is optional and the identifier must be alphanumeric (meaning it can contain a version number).

It is also a NuGet convention to pad the number with leading zeros so the version comparison logic works right. Otherwise 1.0.0-alpha9 will be a higher version than 1.0.0-alpha10.

There also seems to be an issue with the way you implemented the preid - if it is not supplied to the command, but it does exist in the .json file it will be removed instead of bumping the version. But according to the spec it is required during pre-release, so this logic is invalid.

It would be nice if you could fix this. Fortunately other than the pre-release stage it works great. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions