mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
docs: Add generated argocd command docs (#4606)
This commit is contained in:
20
tools/cmd-docs/main.go
Normal file
20
tools/cmd-docs/main.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/argoproj/argo-cd/cmd/argocd/commands"
|
||||
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// set HOME env var so that default values involve user's home directory do not depend on the running user.
|
||||
os.Setenv("HOME", "/home/user")
|
||||
|
||||
err := doc.GenMarkdownTree(commands.NewCommand(), "./docs/user-guide/commands")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user