Skip to content

Commit

Permalink
tag target in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidlo committed Apr 9, 2024
1 parent d9661f3 commit d08c275
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,14 +22,22 @@ 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
pip install .[test]
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:
Expand Down

0 comments on commit d08c275

Please sign in to comment.