Add scripts and targets for manpages and yamldocs

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ff615dbc4d
Component: cli
This commit is contained in:
Tibor Vass
2017-05-10 18:24:32 -07:00
parent 2764166c95
commit 4bf796daf6
6 changed files with 44 additions and 5 deletions

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Generate man pages for docker/docker
#
set -eu
mkdir -p ./man/man1
MD2MAN_REPO=github.com/cpuguy83/go-md2man
MD2MAN_COMMIT=$(grep -F "$MD2MAN_REPO" vendor.conf | cut -d' ' -f2)
(
go get -d "$MD2MAN_REPO"
cd "$GOPATH"/src/"$MD2MAN_REPO"
git checkout "$MD2MAN_COMMIT" &> /dev/null
go install "$MD2MAN_REPO"
)
# Generate man pages from cobra commands
go build -o /tmp/gen-manpages ./man
/tmp/gen-manpages --root . --target ./man/man1
# Generate legacy pages from markdown
./man/md2man-all.sh -q

View File

@ -0,0 +1,5 @@
#!/bin/sh
go build -o build/yaml-docs-generator github.com/docker/cli/docs/yaml
mkdir docs/yaml/gen
build/yaml-docs-generator --root $(pwd) --target $(pwd)/docs/yaml/gen