-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt MinVer #465
Adopt MinVer #465
Conversation
We should also re-evaluate this script |
You say "re-evaluate" I say "delete" with "fire". |
Exactly! |
Releases.md
Outdated
@@ -0,0 +1,13 @@ | |||
# Process for Releasing | |||
|
|||
First before creating a release, make sure that [the version number in `Directory.Build.Props`](https://github.com/justeat/JustSaying/blob/d30543fbfc3cf640835339efbe497466e230f220/Directory.Build.props#L22) matches the major and minor version you are looking to release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wouldn't need to do this is we opt to rely on tags only. If we did that then there's no risk of them not being aligned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property doesn't affect the release process. The release is purely driven by the tag you create. Updating this property is actually something you'd do after releasing, in the case where you want to start work on a new major-minor range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll update this 👍
Have you got this configured correctly? I just tried adding MinVer to a package of my own and it was generating "too many numbers" and the warning caused my build to fail. Looking in the AppVeyor logs the same is happening here, but it still passes because warnings aren't errors in JustSaying:
Specifically I think it's the |
I'll take a look this evening |
Looks like this is relevant adamralph/minver#92 |
That looks pertinent to the warning, but not the extra zero in the part before the |
We can change this behaviour, but it is expected. The Update: I see that my original comment may have caused this confusion. |
Lets see what the outcome of this is: adamralph/minver#169 |
@martincostello You will get NU1505 when using MinVer, because it will produce SemVer 2.0 version numbers. The reason the build is failing is that you have configured your project to treat warnings as errors. As the warning says, you can safely ignore it if the package is not intended for older clients. "Older clients" in this case, means anything older than around September 2017. You can get rid of the warning like so: https://github.com/adamralph/bullseye/blob/794fbaee349ab4478921f4d5d51b2faaf28158fc/Bullseye/Bullseye.csproj#L8. If you do care about those older (ancient?) clients, then it's probably best not to use MinVer.
@martincostello the version is
@slang25 that PR will not remove NU1505. Even if you change the default pre-release to be someting like The reason the default pre-release identifiers are
Unless you are using a pre-release scheme where |
Thanks @adamralph, I was aware it wouldn't get rid of NU1505, like you say that's a tradeoff between SemVer 2.0 and ye olde clients. We are used to releasing just |
@slang25 even if you change the default pre-release identifiers, MinVer will still add the height to any commit which is not tagged. That behaviour cannot be changed. When you tag, you can tag with whatever version number you like.
The assumption with the commits between the tags, is that they will not be released (or perhaps just to a specialised CI NuGet feed, e.g. on MyGet). If you don't care about them, then you also don't care about the Alternatively, as you suggest above, you could immediately tag the commit following |
Although having said all of the above, I recommend just switching to SemVer 2.0. 🙂 I'm not sure it's worrying about those older clients anymore. |
Just to be clear, I was thinking this:
I'm thinking now we should just adopt the default. |
@slang25 that proposal would work, so long as you don't mind either:
|
It's a valid concern. I think there may already be a requirement for this library to be consumed by nuget 4.3 and up because it has a I'd be interested to know if there are any builds you are seeing using a version of nuget lower than 4.3 and that could could currently update to the current JustSaying 7.x Doing some extra reading, the package versioning we have is likely to be compatible with older clients than 4.3: https://github.com/NuGet/Home/wiki/SemVer-2.0.0-support |
Without doing a full audit of everyone's TeamCity builds, I have no idea what proportion that would be. But my team owns three components that are still on JustSaying 4. Attempts were made to update them recently but the .NET Standard issues with .NET Framework 4.x have made that...fraught. |
Cool, I'll try to verify client compatibility |
It appears to be fine for It's only a problem if you wanted to experiment with a non-released build with your CI nuget client where you couldn't update the client. |
FWIW, to clarify a couple of things:
|
Thanks for the clarification @adamralph |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw the notification from the stale
app that it's going to close this PR soon. If there's anything more I can do to help get this merged, please let me know.
Co-Authored-By: slang25 <[email protected]>
Co-Authored-By: slang25 <[email protected]>
Co-Authored-By: slang25 <[email protected]>
Co-Authored-By: slang25 <[email protected]>
Thanks @adamralph. I've applied your suggestions, and am happy with the state of this PR. @AnthonySteele @martincostello I find it hard to gauge in GitHub comments the consensus and feelings towards things like this, feel free to let me know if this is something you do or don't want to adopt 🙂 |
If I'm honest, I'm currently ambivalent to this either way, though that's mainly because when I first tried it I couldn't get it to work the way I wanted. We have our weekly JustSaying meeting in 20 minutes so we can discuss there, then feedback here afterwards. |
@martincostello out of interest, what problems did you face? |
@adamralph I think it was because I was getting numbers like |
@martincostello the zero effectively means "there isn't yet an alpha". When you want to release your first alpha, you'll tag a commit with something like "1.0.0-alpha.1", indicating "alpha 1", i.e. the first alpha. |
@@ -12,13 +11,16 @@ | |||
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="$(AnalyzersPackageVersion)" PrivateAssets="All" /> | |||
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="$(AnalyzersPackageVersion)" PrivateAssets="All" /> | |||
<PackageReference Include="Text.Analyzers" Version="$(AnalyzersPackageVersion)" PrivateAssets="All" /> | |||
<PackageReference Include="MinVer" Version="1.0.0-beta.4" PrivateAssets="All" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can now be 1.0.0-rc.1
@slang25 Have merged 👍 Can you submit a PR to update MinVer to latest? |
This PR swaps out our (IMO good) versioning in favour of MinVer.
After reading the How it works section, I'm convinced it's nailed it, and does everything we currently want in terms of versioning (even the
x.0.0.0
assembly version number).I've used the
MinVerMajorMinor
property to mimic how we currently control the version number, but we could be worth dropping this and letting it discover it automatically. It would mean after releasing av7.0.0
, we'd create av8.0.0-alpha.0
tag, then any PR builds would follow on from that (if that makes sense). This would help us avoid situations where a release is made without a tag, as that would be the only way to manage the version number.