Merge pull request #2877 from Foxboron/morten/fix-man

generate-man.sh: Only build md2man if it's not installed
This commit is contained in:
Silvin Lubecki 2020-12-10 09:41:38 +01:00 committed by GitHub
commit 42d4489992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -4,8 +4,10 @@ set -eu -o pipefail
mkdir -p ./man/man1 mkdir -p ./man/man1
# yay, go install creates a binary named "v2" ¯\_(ツ)_/¯ if ! command -v md2man &> /dev/null; then
go build -o "/go/bin/md2man" ./vendor/github.com/cpuguy83/go-md2man/v2 # yay, go install creates a binary named "v2" ¯\_(ツ)_/¯
go build -o "/go/bin/md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
fi
# Generate man pages from cobra commands # Generate man pages from cobra commands
go build -o /tmp/gen-manpages github.com/docker/cli/man go build -o /tmp/gen-manpages github.com/docker/cli/man