diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-04-16 08:23:32 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-04-16 08:23:32 +0200 |
commit | f21b827f7b1b200b83f64a558b1b44cf6bf312e9 (patch) | |
tree | 10fd9f48e03bda6a89ed000fce10d2f17b8b46c5 /commands/commands.go | |
parent | 7c597c7d756652c3cd50f3b538559ef505d817b9 (diff) | |
download | hugo-f21b827f7b1b200b83f64a558b1b44cf6bf312e9.tar.gz hugo-f21b827f7b1b200b83f64a558b1b44cf6bf312e9.zip |
commands: Re-add the missing releaser command
Diffstat (limited to 'commands/commands.go')
-rw-r--r-- | commands/commands.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/commands/commands.go b/commands/commands.go index d0cc97b85..8ba28e10d 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -49,6 +49,7 @@ func (b *commandsBuilder) addAll() *commandsBuilder { newListCmd(), newImportCmd(), newGenCmd(), + createReleaser(), ) return b @@ -62,7 +63,11 @@ func (b *commandsBuilder) build() *hugoCmd { func addCommands(root *cobra.Command, commands ...cmder) { for _, command := range commands { - root.AddCommand(command.getCommand()) + cmd := command.getCommand() + if cmd == nil { + continue + } + root.AddCommand(cmd) } } @@ -110,6 +115,19 @@ type hugoCmd struct { c *commandeer } +var _ cmder = (*nilCommand)(nil) + +type nilCommand struct { +} + +func (c *nilCommand) getCommand() *cobra.Command { + return nil +} + +func (c *nilCommand) flagsToConfig(cfg config.Provider) { + +} + func (b *commandsBuilder) newHugoCmd() *hugoCmd { cc := &hugoCmd{} |