Skip to content
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

feat(nuget): add version scheme #4749

Merged
merged 2 commits into from Nov 1, 2019

Conversation

mark-raymond
Copy link
Contributor

NuGet packages sometimes use version numbers with more than 3 parts, which Renovate doesn't work with by default as they don't conform to SemVer. You can switch to the "loose" version scheme, as suggested in #4027, but that doesn't correctly differentiate between prerelease and stable packages.

This PR introduces a dedicated "nuget" version scheme, that follows closely how NuGet itself compares versions. I believe this more completely resolves #4027.

I hope that this can become the default version scheme for nuget, in lib/manager/nuget/extract.ts, but I didn't include changing the default in this PR in case that's too controversial!

@mark-raymond
Copy link
Contributor Author

The one test failure is in code I didn't change; I guess that's spurious and needs rerunning?

@rarkins
Copy link
Collaborator

rarkins commented Oct 31, 2019

@mark-raymond thanks for the PR. I think let's merge it as-is for now (i.e. opt-in), then you can fully test it in production, and if after some weeks you are happy with it then we can evaluate whether to make it the default for nuget.

Perhaps also we can create a new issue to track implementing range support for NuGet versioning

@rarkins rarkins changed the title Add nuget version scheme feat(nuget): add version scheme Oct 31, 2019
@mark-raymond
Copy link
Contributor Author

That all sounds good to me 🙂

@rarkins rarkins merged commit 5d01acc into renovatebot:master Nov 1, 2019
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 19.66.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mark-raymond mark-raymond deleted the nuget-versions branch November 2, 2019 09:04
@nyctef
Copy link

nyctef commented Nov 20, 2019

What's the best way to use this version scheme? I've tried setting

{
  "nuget": {
    "versionScheme": "nuget"
    ...
  }
  ...
}

but that didn't seem to work - I'm still seeing "skipReason": "not-version" on some nuget packages in the job log. I could try setting versionScheme: nuget at the top level config, but that'd probably be a bad idea for us since we're also using npm and other package types in the same repo.

@mark-raymond
Copy link
Contributor Author

Yeah, I couldn't get it to work inside the "nuget" section; I just set it at the top level because the repos I was dealing with were nuget only.

@rarkins
Copy link
Collaborator

rarkins commented Nov 20, 2019

Please raise a new issue in the config-help repository instead, and you can link a reference back to this issue if you like. If it turns out to be impossible or a bug, we will then treat it as a new issue back in this repository.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nuget version with 4 components
4 participants