Skip to content

Commit

Permalink
make check-readme update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Nov 20, 2020
1 parent 9c82a9c commit 18a20df
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ mypy: ##: check for type errors

##:

.PHONY: releasechecklist
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 || { \
echo "README.rst doesn't specify $$rev_line"; \
echo "Please run make update-readme"; exit 1; }

.PHONY: update-readme
update-readme:
sed -i -e 's/rev: ".*"/rev: "$(shell $(PYTHON) setup.py --version)"/' README.rst

FILE_WITH_VERSION = src/check_python_versions/__init__.py
include release.mk
HELP_SECTION_SEP = ""

0 comments on commit 18a20df

Please sign in to comment.