aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gen_markdown.go
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gen_markdown.go')
-rw-r--r--doc/gen_markdown.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/gen_markdown.go b/doc/gen_markdown.go
new file mode 100644
index 00000000..ee87d544
--- /dev/null
+++ b/doc/gen_markdown.go
@@ -0,0 +1,24 @@
+// +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", "md")
+
+ fmt.Println("Generating Markdown documentation ...")
+
+ err := doc.GenMarkdownTree(commands.RootCmd, filepath)
+ if err != nil {
+ log.Fatal(err)
+ }
+}