diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-10-30 09:29:38 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-10-30 11:46:40 +0100 |
commit | 89bd025ebfd2c559039826641702941fc35a7fdb (patch) | |
tree | 96b457737db99ffd1a27d502798257f0e7d79db6 /main_withdeploy_test.go | |
parent | 62567d38205a61134a6822d37a534520772419f1 (diff) | |
download | hugo-89bd025ebfd2c559039826641702941fc35a7fdb.tar.gz hugo-89bd025ebfd2c559039826641702941fc35a7fdb.zip |
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
Diffstat (limited to 'main_withdeploy_test.go')
-rw-r--r-- | main_withdeploy_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/main_withdeploy_test.go b/main_withdeploy_test.go new file mode 100644 index 000000000..de50313c3 --- /dev/null +++ b/main_withdeploy_test.go @@ -0,0 +1,29 @@ +// Copyright 2024 The Hugo Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build withdeploy +// +build withdeploy + +package main + +import ( + "testing" + + "github.com/rogpeppe/go-internal/testscript" +) + +func TestWithdeploy(t *testing.T) { + p := commonTestScriptsParam + p.Dir = "testscripts/withdeploy" + testscript.Run(t, p) +} |