question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PreRelease overrides keeps adding ".0"

See original GitHub issue

My question is about that guy in bold: 1.0.1-PR .0 .1+test

Major: 1 Minor: 0 Patch: 1 Prerelease: PR Who the heck are you!?: 0 Height: 1 metadata: test

Is there a reason why if I use the defaultPreRelease override it keep adding the .0 at the end of my override, as opposed of what’s written in the FAQ: https://github.com/adamralph/minver#can-i-change-the-default-pre-release-phase-from-alpha-to-something-else

I know the technical reason, it’s hardcoded that way here: https://github.com/adamralph/minver/blob/38b456ccb69e908f771fb70c4fdc3baec790cb9d/MinVer.Lib/Version.cs#L19

But is there another reason?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adamralphcommented, Dec 5, 2020

The 0 is the pre-release “number”. That is, you don’t want to be restricted to a single pre-release, since it’s likely you will want a 1st pre-release (1.0.1.PR.1), a 2nd pre-release (1.0.1.PR.2) etc. The “0th” pre-release is not one that you will release. It’s just a way of versioning the interim builds between an RTM and your next pre-release.

E.g. your commits might be versioned as follows:

  • 0.0.0.PR.0 (root commit)
  • 0.0.0.PR.0.1
  • 0.0.0.PR.0.2
  • 1.0.0.PR.1 (tagged and released)
  • 1.0.0.PR.1.1
  • 1.0.0.PR.1.2
  • 1.0.0.PR.2 (tagged and released)
  • 1.0.0.PR.2.1
  • 1.0.0.PR.2.2
  • 1.0.0 (tagged and released)
  • 1.0.1.PR.0.1 <-- this is the version you are currently seeing
  • 1.0.1.PR.0.2
  • 1.0.1.PR.1 (tagged and released)
  • 1.0.1.PR.1.1
  • 1.0.1.PR.1.2
  • 1.0.1.PR.2 (tagged and released)
  • 1.0.1.PR.2.1
  • 1.0.1.PR.2.2
  • 1.0.1 (tagged and released)

Side note: you may want to consider using something other than “PR” as your pre-release phase. It’s easily confused with “pull request”. When I first saw it, I thought that’s what it meant.

1reaction
iampluquecommented, Dec 4, 2020

Default pre-release identifiers are added. The default pre-release phase is “alpha”, but this can be customised.

I read it and it still not explain the “0” behavior … it says alpha, not alpha.0. Can you be more specific?

Read more comments on GitHub >

github_iconTop Results From Across the Web

adamralph minver Q A · Discussions
PreRelease overrides keeps adding ".0" ... MinVer consistently adds a prerelease versions to my releases ... Add Date/TimeStamp suffix to build?
Read more >
Version vs VersionSuffix vs PackageVersion: What do they ...
Overriding values when calling dotnet build​​ As well as hard-coding the version numbers into your project file, you can also pass them as ......
Read more >
Versioning Guidelines - Fedora Docs
The overriding goal is to provide sequences of packages which are treated as updates by RPM's version comparison algorithm while accommodating varied and ......
Read more >
Setting assembly and nuget package metadata in .NET Core
If the version contains VersionSuffix then the package is treated as pre-release package. Version property is also used in Microsoft.NET.
Read more >
MinVer 3.0.0-alpha.1
Default pre-release identifiers are added. The default pre-release phase is "alpha", but this can be customised.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found