mirror of
https://github.com/docker/compose.git
synced 2025-07-24 22:24:41 +02:00
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
|
.PHONY: docs
|
||||||
docs: ## generate documentation
|
docs: ## generate documentation
|
||||||
@docker build . \
|
$(eval $@_TMP_OUT := $(shell mktemp -d -t dockercli-output.XXXXXXXXXX))
|
||||||
--output type=local,dest=./docs/ \
|
docker build . \
|
||||||
|
--output type=local,dest=$($@_TMP_OUT) \
|
||||||
-f ./docs/docs.Dockerfile \
|
-f ./docs/docs.Dockerfile \
|
||||||
--target update
|
--target update
|
||||||
|
rm -rf ./docs/internal
|
||||||
|
cp -R "$($@_TMP_OUT)"/out/* ./docs/
|
||||||
|
rm -rf "$($@_TMP_OUT)"/*
|
||||||
|
|
||||||
.PHONY: validate-docs
|
.PHONY: validate-docs
|
||||||
validate-docs: ## validate the doc does not change
|
validate-docs: ## validate the doc does not change
|
||||||
|
@ -39,7 +39,7 @@ cp -r docs/reference /out
|
|||||||
EOT
|
EOT
|
||||||
|
|
||||||
FROM scratch AS update
|
FROM scratch AS update
|
||||||
COPY --from=gen /out /
|
COPY --from=gen /out /out
|
||||||
|
|
||||||
FROM gen AS validate
|
FROM gen AS validate
|
||||||
RUN --mount=target=/context \
|
RUN --mount=target=/context \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user