With a goal of reducing the number of NuGet packages stored in Nexus, there should be a scheduled task that can be defined with the following criteria:
1. Remove all pre-release package versions if there is at least one release package version in a set of repositories
2. Keep up to n unique semantic package *pre-release* versions at level major
For item 2, for example:
We have upcoming releases of version 4.7.0 and 4.5.1 and development is on version 5.0.0
This means our build servers generate packages for all these three versions:
... (and so on)
After clean we only want to see the following remain:
If I configure N = 1 in the component selector.
These requirements are very similar to the Maven specific Remove Releases and Remove Snapshots tasks.
This would require us though implementing a component selector that was:
- specific to NuGet packages and their versioning specification: https://docs.nuget.org/create/versioning
- require that packages strictly follow the versioning guidelines that NuGet outlines in their documentation