forked from libkeepass/pykeepass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 798 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.ONESHELL:
.SHELLFLAGS = -ec
.SILENT:
version := $(shell python -c "import tomllib;print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
.PHONY: dist
dist:
python -m build
.PHONY: release
release: lock dist
# check that changelog is updated
if ! grep ${version} CHANGELOG.rst
then
echo "Changelog doesn't seem to be updated! Quitting..."
exit 1
fi
twine upload -u __token__ dist/pykeepass-$(version)*
gh release create pykeepass-$(version) dist/pykeepass-$(version)*
.PHONY: lock
lock:
# 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: docs
docs:
lazydocs pykeepass --overview-file README.md
ghp-import -f -p -b docs docs