Closed sebastienros closed 4 years ago
I like the version based approach to limit packages, this would be easy to use and straight forward to implement in Sleet.
It could work by:
feed-settings
command for any value, or a new command could be added to make surface this.sleet.packageindex.json
Possibly add a retention-clean
command that has a --no-op
/ --dry-run
option.
Concerns / use cases (focusing on SemVer - ie. 3 components + prerelease tag):
1.0.1-alpha1
and 1.0.2-alpha1
count as 1 pre-release for versions 1 and 2 ..)
Major.Minor.Patch
)
I could envision a situation where I'd also want different rules. An example is a speedy development cycle, where we might want to keep ALL pre-releases for the CURRENT/LATEST version, but a limited set of the non-latest versions.. And then finally, for the previous major version, we might keep no pre-releases at all.
I don't know yet how to describe this in rules.
Package retention has been added in https://www.nuget.org/packages/Sleet/3.1.8
@LordMike I'm going to start with the basic scenarios for package retention. I've included --dry-run
per your suggestion, I think that is a great idea. For more complex pruning scenario I'm interested in how these could be described or if an extension point is needed for this.
Delete packages based on:
Not by date. Just in order to keep a limited set of packages.