Possible bug : SemVer tags & metadata using version templates

After some inquiries, I found out that Octopus server does not accept the same release number when using prerelease tags and metadata. It all depends on the way you specify it : by template (eg : c.c.i) or explicitly (eg : 1.2.0) .

Release

Template

Explicit

x.x.x-Multipart-Tag

❌

✓

x.x.x-Tag+Metadata

❌

✓

x.x.x-Tag+Multipart-Metadata

❌

✓

x.x.x-Tag+Multipart.Metadata2

❌

✓

Worse, once I created a release explicitly with a metadata part using Octopus server, any releases created using a version template restarted to 0.0.1, even stable ones. Once I deleted the release with the metadata, they started again to use the right version number.

It seems to me that it is almost as if the version template parser cannot understand the version number when it contains a metadata. Doing so, the "parsing" fails and start from 0.0.0 again.

To sum up and reproduce, follow these steps :
* Create a new release with c.c.i : ✓
* Create a new release with c.c.i-Tag+Metadata : ❌ 'The release number 'c.c.i-Tag+Metadata' does not appear ...
* Create a new release with 1.0.0-Tag+Metadata : ✓
* Create a new release with c.c.i : ✓ but the release is marked as 0.0.1

This behaviour seems to be reproducible either entirely using the Octopus server, or using octo.exe.
Octopus : 4.1.2
Octo.exe : 4.27.3 (through 4.15.10 teamcity plugin)

Thanks a lot. I'm not sure how you"re working with github issue vs my report, but you've missed a few points in your issue description :
- this behaviour is only occuring when using version number templates - version number that start from 0.0.0 again when using templates Octopus/octo.exe cannot "parse" the release number.

That last point especially is problematic because it could mean that version number would start from 0.0.0 in other cases too no ?

Thanks for noticing that, we didn't dig deep into just wanted to log it so we can prioritize it. To make sure we fix all of it I've added those extra details too, we'll be using this discussion here as the source to ensure we fix it right.