forked from loic-sharma/BaGet
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Smarter cleaning rules for packages with SemVer (#184)
BREAKING CHANGE: `MaxVersionsPerPackage` key in config file is now obsolete and has to be replaced by the `Retention` config (see https://www.bagetter.com/docs/configuration#package-auto-deletion for further details).
- Loading branch information
1 parent
0249cde
commit aaab667
Showing
11 changed files
with
290 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace BaGetter.Core; | ||
|
||
public class RetentionOptions | ||
{ | ||
/// <summary> | ||
/// If this is set to a value, it will limit the number of versions that can be pushed for a package. | ||
/// The limit is applied to each major version of the package, and if the limit is exceeded, | ||
/// the older versions will be deleted. | ||
/// </summary> | ||
public uint? MaxHistoryPerMajorVersion { get; set; } = null; | ||
|
||
/// <summary> | ||
/// This corresponds to the maximum number of minor versions for each major version. | ||
/// If this is set to a value, it will limit the number of versions that can be pushed for a package. | ||
/// The limit is applied to each minor version of the package, and if the limit is exceeded, | ||
/// the older versions will be deleted. | ||
/// </summary> | ||
public uint? MaxHistoryPerMinorVersion { get; set; } | ||
|
||
/// <summary> | ||
/// If this is set to a value, it will limit the number of versions that can be pushed for a package. | ||
/// The limit is applied to each patch number of the package, and if the limit is exceeded, | ||
/// the older versions will be deleted. | ||
/// </summary> | ||
public uint? MaxHistoryPerPatch { get; set; } | ||
|
||
/// <summary> | ||
/// If this is set to a value, it will limit the number of versions that can be pushed for a package. | ||
/// The limit is applied to each pre-release of the package, and if the limit is exceeded, | ||
/// the older versions will be deleted. | ||
/// </summary> | ||
public uint? MaxHistoryPerPrerelease { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.