aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorRobert van Gent <[email protected]>2018-12-20 11:22:03 -0800
committerBjørn Erik Pedersen <[email protected]>2019-05-03 17:58:40 +0200
commitc7165589b3be5923f1275f0024818e6ae889d881 (patch)
tree333590256ddbeaecbe310c980f133782831eb13e /commands/hugo.go
parentad5703a91712cd245231ba8fdbc49632c794a165 (diff)
downloadhugo-c7165589b3be5923f1275f0024818e6ae889d881.tar.gz
hugo-c7165589b3be5923f1275f0024818e6ae889d881.zip
Add a "deploy" command
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 0a6b9750c..c6819b054 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -204,17 +204,22 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
"buildWatch",
"cacheDir",
"cfgFile",
+ "confirm",
"contentDir",
"debug",
"destination",
"disableKinds",
+ "dryRun",
+ "force",
"gc",
+ "i18n-warnings",
"layoutDir",
"logFile",
- "i18n-warnings",
+ "maxDeletes",
"quiet",
"renderToMemory",
"source",
+ "target",
"theme",
"themesDir",
"verbose",
@@ -263,6 +268,9 @@ func setValueFromFlag(flags *flag.FlagSet, key string, cfg config.Provider, targ
case "stringSlice":
bv, _ := flags.GetStringSlice(key)
cfg.Set(configKey, bv)
+ case "int":
+ iv, _ := flags.GetInt(key)
+ cfg.Set(configKey, iv)
default:
panic(fmt.Sprintf("update switch with %s", f.Value.Type()))
}