Skip to content

Commit

Permalink
use gh tool for releasing from Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidlo committed Jan 27, 2024
1 parent 01dcc17 commit fc1771a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
version := $(shell python -c "exec(open('pykeepass/version.py').read());print(__version__)")
.ONESHELL:
.SILENT:
version := $(shell python -c "import tomllib;print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")

.PHONY: dist
dist:
python setup.py sdist bdist_wheel
python -m build

.PHONY: pypi
pypi: dist
twine upload dist/pykeepass-$(version).tar.gz
.PHONY: release
release: 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 dist/pykeepass-$(version)*
gh release create pykeepass-$(version) dist/pykeepass-$(version)*

.PHONY: docs
docs:
Expand Down

0 comments on commit fc1771a

Please sign in to comment.