build: Allow optional "nodeploy" tag to exclude deploy command from bin

Fixes #7826
This commit is contained in:
Eric Hagman
2020-10-23 03:03:41 -04:00
committed by GitHub
parent 3400aff258
commit f465c5c307
11 changed files with 66 additions and 2 deletions

View File

@@ -354,6 +354,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
if envtags := os.Getenv("HUGO_BUILD_TAGS"); envtags != "" {
return envtags
}