mirror of https://github.com/docker/compose.git
use a temp directory to generate doc to be sure working tree is clean
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
parent
099715fb6f
commit
be187bae64
8
Makefile
8
Makefile
|
@ -84,10 +84,14 @@ lint: ## run linter(s)
|
|||
|
||||
.PHONY: docs
|
||||
docs: ## generate documentation
|
||||
@docker build . \
|
||||
--output type=local,dest=./docs/ \
|
||||
$(eval $@_TMP_OUT := $(shell mktemp -d -t dockercli-output.XXXXXXXXXX))
|
||||
docker build . \
|
||||
--output type=local,dest=$($@_TMP_OUT) \
|
||||
-f ./docs/docs.Dockerfile \
|
||||
--target update
|
||||
rm -rf ./docs/internal
|
||||
cp -R "$($@_TMP_OUT)"/out/* ./docs/
|
||||
rm -rf "$($@_TMP_OUT)"/*
|
||||
|
||||
.PHONY: validate-docs
|
||||
validate-docs: ## validate the doc does not change
|
||||
|
|
|
@ -39,7 +39,7 @@ cp -r docs/reference /out
|
|||
EOT
|
||||
|
||||
FROM scratch AS update
|
||||
COPY --from=gen /out /
|
||||
COPY --from=gen /out /out
|
||||
|
||||
FROM gen AS validate
|
||||
RUN --mount=target=/context \
|
||||
|
|
Loading…
Reference in New Issue