Enable deprecation error for v1.17.0 (#18341)

Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
Gusted 2022-01-20 18:00:38 +01:00 committed by GitHub
parent 16d378fefc
commit 1d98d205f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 84 additions and 52 deletions

View file

@ -30,11 +30,12 @@ var (
func newMirror() {
// Handle old configuration through `[repository]` `DISABLE_MIRRORS`
// - please note this was badly named and only disabled the creation of new pull mirrors
// FIXME: DEPRECATED to be removed in v1.18.0
deprecatedSetting("repository", "DISABLE_MIRRORS", "mirror", "ENABLED")
if Cfg.Section("repository").Key("DISABLE_MIRRORS").MustBool(false) {
log.Warn("Deprecated DISABLE_MIRRORS config is used, please change your config and use the options within the [mirror] section")
// TODO: enable on v1.17.0: log.Error("Deprecated fallback used, will be removed in v1.18.0")
Mirror.DisableNewPull = true
}
if err := Cfg.Section("mirror").MapTo(&Mirror); err != nil {
log.Fatal("Failed to map Mirror settings: %v", err)
}