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 ./...
|
||||
|
||||
validate-doc: generate-dns
|
||||
ifneq ($(shell git status --porcelain -- ./docs/ ./cmd/ 2>/dev/null),)
|
||||
@echo 'The documentation must be regenerated, please use `make generate-dns`.'
|
||||
@git status --porcelain -- ./docs/ ./cmd/ 2>/dev/null
|
||||
@exit 2
|
||||
else
|
||||
@echo 'All documentation changes are done the right way.'
|
||||
endif
|
||||
validate-doc: DOC_DIRECTORIES := ./docs/ ./cmd/
|
||||
validate-doc:
|
||||
if git diff --exit-code --quiet $(DOC_DIRECTORIES) 2>/dev/null; then \
|
||||
echo 'All documentation changes are done the right way.'; \
|
||||
else \
|
||||
echo 'The documentation must be regenerated, please use `make generate-dns`.'; \
|
||||
git status --porcelain -- $(DOC_DIRECTORIES) 2>/dev/null; \
|
||||
exit 2; \
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue