Skip to content

Commit

Permalink
Update the docs target in Makefile
Browse files Browse the repository at this point in the history
- Depending on the modification times of the README and proto files
doesn't seem to work well in practice, since git is changing the
modification times whenever you clone, revert, etc.
- Instead, always regenerate the README doc when `make docs` is invoked

Signed-off-by: Ryan Richard <[email protected]>
  • Loading branch information
andrewedstrom authored and cfryanr committed Mar 23, 2020
1 parent d6f5fdd commit bfe1344
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
.DEFAULT_GOAL:=all
SRCS=$(shell find . -name '*.cc')
HDRS=$(shell find . -name '*.h')
PROTOS=$(shell find config -name '*.proto')
TARGET:=//src/main:auth_server
BAZEL_FLAGS:=--incompatible_depset_is_not_iterable=false --verbose_failures

all: build test docs

docs: docs/README.md

docs/README.md: $(PROTOS)
# go get -v -u go.etcd.io/protodoc
docs:
# If the protodoc command is not found, you can install it with: go get -v -u go.etcd.io/protodoc
protodoc --directories=config=message --title="Configuration Options" --output="docs/README.md"
grep -v '(validate.required)' docs/README.md > /tmp/README.md && mv /tmp/README.md docs/README.md

Expand Down

0 comments on commit bfe1344

Please sign in to comment.