From 5a8c6498bb289ce7859fc17803a5a54bc22646c6 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 20 Jul 2018 15:47:06 +0200 Subject: generate manpages --- doc/gen_manpage.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/gen_manpage.go (limited to 'doc/gen_manpage.go') diff --git a/doc/gen_manpage.go b/doc/gen_manpage.go new file mode 100644 index 00000000..e5a38b3a --- /dev/null +++ b/doc/gen_manpage.go @@ -0,0 +1,29 @@ +// +build ignore + +package main + +import ( + "fmt" + "github.com/MichaelMure/git-bug/commands" + "github.com/spf13/cobra/doc" + "log" + "os" + "path" +) + +func main() { + cwd, _ := os.Getwd() + filepath := path.Join(cwd, "doc", "man") + + header := &doc.GenManHeader{ + Title: "MINE", + Section: "3", + } + + fmt.Println("Generating manpage ...") + + err := doc.GenManTree(commands.RootCmd, header, filepath) + if err != nil { + log.Fatal(err) + } +} -- cgit