Skip to content

Commit

Permalink
build(Makefile): Detect markdown files with make watch_test
Browse files Browse the repository at this point in the history
This makes it easier to QA doctest files via
make watch_test
  • Loading branch information
tony committed Sep 10, 2022
1 parent 72db710 commit fbc5e82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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:
Expand All @@ -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
Expand Down

0 comments on commit fbc5e82

Please sign in to comment.