From fbc5e820784bdd397ce4f4a3eddc77ad77cafb36 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 6 Sep 2022 21:19:52 -0500 Subject: [PATCH] build(Makefile): Detect markdown files with make watch_test This makes it easier to QA doctest files via make watch_test --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c9609c7bc..fd60024a4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ PY_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]py$$' 2> /dev/null +DOC_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.]md\$\|.*[.]css\$\|.*[.]py\$\|mkdocs\.yml\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null +ALL_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]py\$\|.*[.]rst\$\|.*[.]md\$\|.*[.]css\$\|.*[.]py\$\|mkdocs\.yml\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null entr_warn: @@ -22,7 +24,7 @@ start: $(MAKE) test; poetry run ptw . watch_test: - if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi + if command -v entr > /dev/null; then ${ALL_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi build_docs: $(MAKE) -C docs html