diff --git a/Makefile b/Makefile index 500aa5af..acc57196 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,10 @@ dist: .PHONY: release release: lock dist - # check that changelog is updated - if ! grep ${version} CHANGELOG.rst + # check that changelog is updated. only look at first 3 parts of semver + version=$(version) + stripped=$$(echo $${version} | cut -d . -f -3) + if ! grep $${stripped} CHANGELOG.rst then echo "Changelog doesn't seem to be updated! Quitting..." exit 1 @@ -20,7 +22,7 @@ release: lock dist .PHONY: lock lock: - # make a requirements.txt lockfile + # run tests then make a requirements.txt lockfile rm -rf .venv_lock virtualenv .venv_lock . .venv_lock/bin/activate @@ -28,6 +30,14 @@ lock: python tests/tests.py pip freeze > requirements.txt +.PHONY: tag +tag: + # tag git commit + git add requirements.txt + git add CHANGELOG.rst + git commit -m "bump version" + git tag -a v$(version) -m "version $(version)" + .PHONY: docs docs: