Build without the deploy feature by default

Build tags setup changed to:

* !nodeploy => withdeploy
* nodeploy => !withdeploy

Also move the deploy feature out into its own release archives.

See #12994 for the primary motivation for this change. But this also greatly reduces the number of dependencies in Hugo when you don't need this feature and cuts the binary size greatly.

Fixes #12994
This commit is contained in:
Bjørn Erik Pedersen 2024-10-30 09:29:38 +01:00
parent 62567d3820
commit 89bd025ebf
16 changed files with 78 additions and 42 deletions

View file

@ -334,7 +334,7 @@ func buildFlags() []string {
func buildTags() string {
// To build the extended Hugo SCSS/SASS enabled version, build with
// HUGO_BUILD_TAGS=extended mage install etc.
// To build without `hugo deploy` for smaller binary, use HUGO_BUILD_TAGS=nodeploy
// To build with `hugo deploy`, use HUGO_BUILD_TAGS=withdeploy
if envtags := os.Getenv("HUGO_BUILD_TAGS"); envtags != "" {
return envtags
}