From: Bjørn Erik Pedersen Date: Sun, 19 Apr 2026 09:15:49 +0000 (+0200) Subject: Revert "common/hugo: Deprecate extended and extended_withdeploy editions" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b01cc147032166896b393c552e561a3dbc6d359a;p=brevno-suite%2Fhugo Revert "common/hugo: Deprecate extended and extended_withdeploy editions" This reverts commit a17bdbc5face02ed2470895bcbfe67db7749dc73. Close #14771 --- diff --git a/commands/commandeer.go b/commands/commandeer.go index ce86d1082..77ae0e66f 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -39,7 +39,6 @@ import ( "github.com/gohugoio/hugo/common/hstrings" "github.com/gohugoio/hugo/common/htime" - "github.com/gohugoio/hugo/common/hugo" "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/common/paths" "github.com/gohugoio/hugo/common/types" @@ -473,7 +472,6 @@ func (r *rootCommand) PreRun(cd, runner *simplecobra.Commandeer) error { } // Set up the global logger early to allow info deprecations during config load. loggers.SetGlobalLogger(r.logger) - hugo.WarnDeprecatedEdition() r.changesFromBuild = make(chan []identity.Identity, 10) diff --git a/common/hugo/hugo.go b/common/hugo/hugo.go index 2c42b2b3f..fbb1e53a4 100644 --- a/common/hugo/hugo.go +++ b/common/hugo/hugo.go @@ -304,18 +304,6 @@ func IsDartSassGeV2() bool { return !strings.Contains(DartSassBinaryName, "embedded") } -// WarnDeprecatedEdition emits a deprecation warning if the running binary is -// the extended or extended_withdeploy edition. -func WarnDeprecatedEdition() { - if IsExtended { - if IsWithdeploy { - Deprecate("the extended_withdeploy edition of the Hugo executable", "Use the withdeploy edition instead.", "v0.161.0") - } else { - Deprecate("the extended edition of the Hugo executable", "Use the standard edition instead.", "v0.161.0") - } - } -} - // Deprecate informs about a deprecation starting at the given version. // // A deprecation typically needs a simple change in the template, but doing so will make the template incompatible with older versions. diff --git a/common/hugo/hugo_test.go b/common/hugo/hugo_test.go index 934a846dd..a572f74d4 100644 --- a/common/hugo/hugo_test.go +++ b/common/hugo/hugo_test.go @@ -14,13 +14,11 @@ package hugo import ( - "bytes" "context" "testing" "github.com/bep/logg" qt "github.com/frankban/quicktest" - "github.com/gohugoio/hugo/common/loggers" ) func TestDeprecationLogLevelFromVersion(t *testing.T) { @@ -61,38 +59,3 @@ func TestGetBuildInfo(t *testing.T) { c.Assert(bi.GoVersion, qt.Not(qt.Equals), "") } } - -func TestWarnDeprecatedEdition(t *testing.T) { - c := qt.New(t) - - origExtended, origWithdeploy := IsExtended, IsWithdeploy - t.Cleanup(func() { - IsExtended = origExtended - IsWithdeploy = origWithdeploy - loggers.SetGlobalLogger(nil) - }) - - var buf bytes.Buffer - loggers.SetGlobalLogger(loggers.New(loggers.Options{Level: logg.LevelInfo, StdErr: &buf})) - - IsExtended = true - IsWithdeploy = false - WarnDeprecatedEdition() - c.Assert(buf.String(), qt.Contains, "the extended edition of the Hugo executable") - c.Assert(buf.String(), qt.Contains, "Use the standard edition instead") - - buf.Reset() - - IsExtended = true - IsWithdeploy = true - WarnDeprecatedEdition() - c.Assert(buf.String(), qt.Contains, "the extended_withdeploy edition of the Hugo executable") - c.Assert(buf.String(), qt.Contains, "Use the withdeploy edition instead") - - buf.Reset() - - IsExtended = false - IsWithdeploy = false - WarnDeprecatedEdition() - c.Assert(buf.String(), qt.Equals, "") -} diff --git a/testscripts/commands/hugo__minify_issue13988.txt b/testscripts/commands/hugo__minify_issue13988.txt index d20e746af..122494ce3 100644 --- a/testscripts/commands/hugo__minify_issue13988.txt +++ b/testscripts/commands/hugo__minify_issue13988.txt @@ -1,6 +1,6 @@ hugo --minify --logLevel=info -! stderr 'deprecated.*minifyOutput' +! stderr 'deprecated' grep '

one

two

' public/index.html -- hugo.toml --