chore: validate the DNS documentation generation. (#864)

This commit is contained in:
Ludovic Fernandez 2019-05-06 19:09:36 +02:00 committed by GitHub
parent 5bf36f544a
commit b186acb858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -43,6 +43,9 @@ install:
- echo "TRAVIS_GO_VERSION=$TRAVIS_GO_VERSION"
- dep status -v
before_script:
- make validate-doc
after_success:
- make clean

View file

@ -69,8 +69,17 @@ docs-serve: generate-dns
docs-themes:
@make -C ./docs hugo-themes
# Generate DNS
.PHONY: generate-dns
# DNS Documentation
.PHONY: generate-dns validate-doc
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