Skip to content

Commit

Permalink
add file lock target
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidlo committed Feb 29, 2024
1 parent d094e51 commit 3361df2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.ONESHELL:
.SHELLFLAGS = -ec
.SILENT:
version := $(shell python -c "import tomllib;print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")

Expand All @@ -7,7 +8,7 @@ dist:
python -m build

.PHONY: release
release: dist
release: tests dist
# check that changelog is updated
if ! grep ${version} CHANGELOG.rst
then
Expand All @@ -17,6 +18,21 @@ release: dist
twine upload dist/pykeepass-$(version)*
gh release create pykeepass-$(version) dist/pykeepass-$(version)*

.PHONY: tests
tests:
python tests/tests.py

.PHONY: lock
lock:
# make a requirements.txt lockfile
rm -rf .venv_lock
virtualenv .venv_lock
source .venv_lock/bin/activate
pip install .
python tests/tests.py
pip freeze > requirements.txt


.PHONY: docs
docs:
lazydocs pykeepass --overview-file README.md
Expand Down

0 comments on commit 3361df2

Please sign in to comment.