Merge pull request #3991 from dvdksn/docs/refactor-docs-dir

docs: move doc generation scripts to subdir
This commit is contained in:
Sebastiaan van Stijn 2023-01-31 13:27:37 +01:00 committed by GitHub
commit 3ae101f41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
module github.com/docker/cli/docs module github.com/docker/cli/docs/generate
// dummy go.mod to avoid dealing with dependencies specific // dummy go.mod to avoid dealing with dependencies specific
// to docs generation and not really part of the project. // to docs generation and not really part of the project.
@ -10,4 +10,4 @@ go 1.16
// github.com/docker/cli-docs-tool v0.5.0 // github.com/docker/cli-docs-tool v0.5.0
//) //)
// //
//replace github.com/docker/cli v0.0.0+incompatible => ../ //replace github.com/docker/cli v0.0.0+incompatible => ../../

View File

@ -22,11 +22,11 @@ trap clean EXIT
# install cli-docs-tool and copy docs/tools.go in root folder # install cli-docs-tool and copy docs/tools.go in root folder
# to be able to fetch the required depedencies # to be able to fetch the required depedencies
go mod edit -modfile=vendor.mod -require=github.com/docker/cli-docs-tool@${CLI_DOCS_TOOL_VERSION} go mod edit -modfile=vendor.mod -require=github.com/docker/cli-docs-tool@${CLI_DOCS_TOOL_VERSION}
cp docs/tools.go . cp docs/generate/tools.go .
# update vendor # update vendor
./scripts/vendor update ./scripts/vendor update
# build docsgen # build docsgen
go build -mod=vendor -modfile=vendor.mod -tags docsgen -o /tmp/docsgen ./docs/generate.go go build -mod=vendor -modfile=vendor.mod -tags docsgen -o /tmp/docsgen ./docs/generate/generate.go
) )
mkdir -p docs/yaml mkdir -p docs/yaml