diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-06-18 18:35:11 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-06-18 19:38:34 +0200 |
commit | 12dc9a6e4acd5280a3e8b1658cbb96669fa97057 (patch) | |
tree | 655225ab0edd8347164e9548a4b8c69a46458c6b /commands/deploy.go | |
parent | 1b85303ac20dc0fb30323ec971b996783c6e32f2 (diff) | |
download | hugo-12dc9a6e4acd5280a3e8b1658cbb96669fa97057.tar.gz hugo-12dc9a6e4acd5280a3e8b1658cbb96669fa97057.zip |
deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)
This was broken in the config rewrite in Hugo 0.112.0.
The workaround is to be explicit about setting these flag values (even if just using the defaults), e.g.:
```
hugo deploy --invalidateCDN --maxDeletes 256
```
Fixes #11127
Diffstat (limited to 'commands/deploy.go')
-rw-r--r-- | commands/deploy.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/deploy.go b/commands/deploy.go index 82127adf4..ce1af9546 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -63,9 +63,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", true, "invalidate the CDN cache listed in the deployment target") - cmd.Flags().Int("maxDeletes", 256, "maximum # of files to delete, or -1 to disable") - cmd.Flags().Int("workers", 10, "number of workers to transfer files. defaults to 10") + 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") }, } } |