1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Index: docker.io/cli/scripts/docs/generate-man.sh
===================================================================
--- docker.io.orig/cli/scripts/docs/generate-man.sh
+++ docker.io/cli/scripts/docs/generate-man.sh
@@ -2,10 +2,6 @@
set -eu
-: "${MD2MAN_VERSION=v2.0.5}"
-
-export GO111MODULE=auto
-
function clean {
rm -rf "$buildir"
}
@@ -16,19 +12,10 @@ trap clean EXIT
(
set -x
cp -r . "$buildir/"
+
cd "$buildir"
- # init dummy go.mod
- ./scripts/vendor init
- # install go-md2man and copy man/tools.go in root folder
- # to be able to fetch the required dependencies
- go mod edit -modfile=vendor.mod -require=github.com/cpuguy83/go-md2man/v2@${MD2MAN_VERSION}
- cp man/tools.go .
- # update vendor
- ./scripts/vendor update
# build gen-manpages
- go build -mod=vendor -modfile=vendor.mod -tags manpages -o /tmp/gen-manpages ./man/generate.go
- # build go-md2man
- go build -mod=vendor -modfile=vendor.mod -o /tmp/go-md2man ./vendor/github.com/cpuguy83/go-md2man/v2
+ go build -tags manpages -o /tmp/gen-manpages ./man/generate.go
)
mkdir -p man/man1
@@ -45,6 +32,6 @@ mkdir -p man/man1
continue
fi
mkdir -p "./man${num}"
- (set -x ; /tmp/go-md2man -in "$FILE" -out "./man${num}/${name}")
+ (set -x ; go-md2man -in "$FILE" -out "./man${num}/${name}")
done
)
|