loic-sharma / BaGet

A lightweight NuGet and symbol server
https://loic-sharma.github.io/BaGet/
MIT License
2.57k stars 639 forks source link

Only allow overwrites for pre release packages #764

Open GuidoLeibbrand opened 1 year ago

GuidoLeibbrand commented 1 year ago

Problem

Currently, there is only the setting "AllowPackageOverwrites" in which you can generally set whether a package can be overwritten.

However, there is no option to allow overwriting only for pre-released packages. In our environment, we also create SNAPSHOT versions. For example: 1.1.0-SNAPSHOT. The SNAPSHOT version can be built as often as you like and contains the latest git version for the Version.

Solution

In addition to the option AllowPackageOverwrites we need the option AllowPreReleasePackageOverwrites. So we can explicitly control if a "pre release" package may be overwritten or not.