diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-07 18:24:02 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-07 20:38:13 +0100 |
commit | 0257eb50a428f9a77179600b65f8a3d7f411f48d (patch) | |
tree | e73e069904844846d09645bc36d1e57a498e989c /commands | |
parent | a65622a13e2f20fc8746ccdc89cc6a731635a29e (diff) | |
download | hugo-0257eb50a428f9a77179600b65f8a3d7f411f48d.tar.gz hugo-0257eb50a428f9a77179600b65f8a3d7f411f48d.zip |
Avoid impporting deploy from config when nodeploy tag is set
Test:
```
go list -tags nodeploy ./... | grep deploy
```
Fixes #12009
Diffstat (limited to 'commands')
-rw-r--r-- | commands/deploy.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/deploy.go b/commands/deploy.go index ca6e4d60e..f5354f74d 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -32,8 +32,10 @@ package commands import ( "context" - "github.com/bep/simplecobra" "github.com/gohugoio/hugo/deploy" + "github.com/gohugoio/hugo/deploy/deployconfig" + + "github.com/bep/simplecobra" "github.com/spf13/cobra" ) @@ -62,9 +64,9 @@ documentation. cmd.Flags().Bool("confirm", false, "ask for confirmation before making changes to the target") cmd.Flags().Bool("dryRun", false, "dry run") cmd.Flags().Bool("force", false, "force upload of all files") - cmd.Flags().Bool("invalidateCDN", deploy.DefaultConfig.InvalidateCDN, "invalidate the CDN cache listed in the deployment target") - cmd.Flags().Int("maxDeletes", deploy.DefaultConfig.MaxDeletes, "maximum # of files to delete, or -1 to disable") - cmd.Flags().Int("workers", deploy.DefaultConfig.Workers, "number of workers to transfer files. defaults to 10") + cmd.Flags().Bool("invalidateCDN", deployconfig.DefaultConfig.InvalidateCDN, "invalidate the CDN cache listed in the deployment target") + cmd.Flags().Int("maxDeletes", deployconfig.DefaultConfig.MaxDeletes, "maximum # of files to delete, or -1 to disable") + cmd.Flags().Int("workers", deployconfig.DefaultConfig.Workers, "number of workers to transfer files. defaults to 10") }, } } |