forked from TrueCloudLab/lego
make: fix validate-docs (#1376)
This commit is contained in:
parent
60f7cb0598
commit
ee0b4bd0b3
1 changed files with 9 additions and 7 deletions
16
Makefile
16
Makefile
|
@ -72,10 +72,12 @@ generate-dns:
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
|
||||||
validate-doc: generate-dns
|
validate-doc: generate-dns
|
||||||
ifneq ($(shell git status --porcelain -- ./docs/ ./cmd/ 2>/dev/null),)
|
validate-doc: DOC_DIRECTORIES := ./docs/ ./cmd/
|
||||||
@echo 'The documentation must be regenerated, please use `make generate-dns`.'
|
validate-doc:
|
||||||
@git status --porcelain -- ./docs/ ./cmd/ 2>/dev/null
|
if git diff --exit-code --quiet $(DOC_DIRECTORIES) 2>/dev/null; then \
|
||||||
@exit 2
|
echo 'All documentation changes are done the right way.'; \
|
||||||
else
|
else \
|
||||||
@echo 'All documentation changes are done the right way.'
|
echo 'The documentation must be regenerated, please use `make generate-dns`.'; \
|
||||||
endif
|
git status --porcelain -- $(DOC_DIRECTORIES) 2>/dev/null; \
|
||||||
|
exit 2; \
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue