Skip to content

Commit

Permalink
Add more debugging message when toc related script failed due to grep…
Browse files Browse the repository at this point in the history
  • Loading branch information
chaodaiG committed Feb 24, 2021
1 parent 20b2158 commit a115a58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion hack/update-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ cd "${ROOT}"
# Update tables of contents if necessary.
find keps -name '*.md' \
| grep -Fxvf hack/.notableofcontents \
| xargs mdtoc --inplace --max-depth=5
| xargs mdtoc --inplace --max-depth=5 || (
echo "Failed generating TOC. If this failed silently and you are on mac, try 'brew install grep'"
exit 1
)
5 changes: 4 additions & 1 deletion hack/verify-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ echo "Checking table of contents are up to date..."
# Verify tables of contents are up-to-date
find keps -name '*.md' \
| grep -Fxvf hack/.notableofcontents \
| xargs mdtoc --inplace --max-depth=5 --dryrun
| xargs mdtoc --inplace --max-depth=5 --dryrun || (
echo "Table of content not up to date. If this failed silently and you are on mac, try 'brew install grep'"
exit 1
)

0 comments on commit a115a58

Please sign in to comment.