Guard against running current master (#5959)

* Guard against running current master

With a longer release cycle for v2, we need to guard people from running master and corrupting their data. This adds a new requirement in that  a special config must be set when running master. We will remove when v2 rc is ready.

* add envs
This commit is contained in:
Andrew Camilleri
2024-04-30 11:29:05 +02:00
committed by GitHub
parent c348f442cc
commit 4821f77304
4 changed files with 11 additions and 0 deletions

View File

@@ -45,6 +45,12 @@ namespace BTCPayServer
#endif
conf = confBuilder.Build();
var confirm = conf.GetOrDefault<bool>("EXPERIMENTALV2_CONFIRM", false);
if(!confirm)
{
throw new ConfigException("You are running an experimental version of BTCPay Server that is the basis for v2. Many things will change and break, including irreversible database migrations. THERE IS NO WAY BACK. Please confirm you understand this by setting the setting EXPERIMENTALV2_CONFIRM=true");
}
var builder = new WebHostBuilder()
.UseKestrel()
.UseConfiguration(conf)