Skip to content

Commit

Permalink
Make 'make check-readme' check both rev: lines
Browse files Browse the repository at this point in the history
If either one of them differs from the expected value, print an error
and exit.

(Previously the Makefile rule would be satisfied even if only one of the
two rev: lines were correct.)

I'm sure I'm going to regret going all-in on this shell one-liner at
some point in the future when I have to debug it.
  • Loading branch information
mgedmin committed Dec 18, 2023
1 parent 5ab939f commit f29eaf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -35,7 +35,7 @@ releasechecklist: check-readme # also release.mk will add other checks
.PHONY: check-readme
check-readme:
@rev_line=' rev: "'"`$(PYTHON) setup.py --version`"'"' && \
grep -q "^$$rev_line$$" README.rst || { \
! grep "rev: " README.rst | grep -qv "^$$rev_line$$" || { \
echo "README.rst doesn't specify $$rev_line"; \
echo "Please run make update-readme"; exit 1; }

Expand Down

0 comments on commit f29eaf8

Please sign in to comment.