Support subsequent pre-releases
Opened this issue · 2 comments
This would be really helpful.
I'm not sure why we only support a set of specific pre-release names, I don't think SemVer has any such restriction:
https://semver.org/#spec-item-9
A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. 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
If we removed the constraint that pre-release names must be one of a specific set and instead validate according to SemVer's rules above would that solve your use case? eg:
$ autotag -p dev
1.0.0-dev
$ autotag -p dev.A
1.0.0-dev.A