Minimal manpage generation from cobra
This commit is contained in:
parent
c7f7bfc328
commit
92130d91ba
4 changed files with 19 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -16,3 +16,5 @@
|
|||
.DS_Store
|
||||
|
||||
vendor/
|
||||
|
||||
manpage
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ archives:
|
|||
replacements:
|
||||
darwin: macOS
|
||||
format: tar.gz
|
||||
files:
|
||||
- manpage/gh*.1
|
||||
- id: windows
|
||||
builds: [windows]
|
||||
<<: *archive_defaults
|
||||
|
|
@ -76,6 +78,8 @@ nfpms:
|
|||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
files:
|
||||
"./manpage/gh*.1": "/usr/share/man/man1"
|
||||
|
||||
scoop:
|
||||
bucket:
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -44,3 +44,11 @@ endif
|
|||
git -C site commit -m '$(GITHUB_REF:refs/tags/v%=%)' index.html
|
||||
git -C site push
|
||||
.PHONY: site-publish
|
||||
|
||||
|
||||
manpage:
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: manpages
|
||||
manpages: manpage
|
||||
go run ./cmd/gen-docs ./manpage
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ func main() {
|
|||
if err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
|
||||
err = doc.GenManTree(command.RootCmd, nil, dir)
|
||||
if err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func filePrepender(filename string) string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue