emgarten / Sleet

A static nuget feed generator for Azure Storage, AWS S3, and more.
MIT License
362 stars 43 forks source link

Add package retention commands #110

Closed emgarten closed 4 years ago

emgarten commented 4 years ago

Automatic prune on push

Using retention settings will allow setting the max number of stable and prerelease package versions on the feed. After each push prune will automatically run to remove package versions beyond the limit. If the package that was just pushed is subject to pruning it will be left on the feed to avoid removing a package that was just pushed.

Prune command

A manual prune command retention prune can be used to prune only a given set of package ids or wildcard strings. By default this will use the retention feed settings, but it will also allow overriding the number of versions allowed.

A --dry-run option can be used to view the list of packages that will be pruned before removing them.

Out of scope

These features are not part of package retention, but could be added in the future if they are needed. (Give feedback if you feel strongly about these!)

Fixes