Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ PYTHON ?= python3.13
REMOTE = git@github.com:Mic92/python-mpd2
VERSION = $(shell $(PYTHON) -c "import mpd; print('.'.join(map(str,mpd.VERSION)))")

test:
tox
release: test
test "$(shell git symbolic-ref --short HEAD)" = "master" || (echo "not on master branch"; exit 1)
git pull --rebase origin master
release:
test "$(shell git symbolic-ref --short HEAD)" = "main" || (echo "not on main branch"; exit 1)
git pull --rebase origin main
$(PYTHON) -m build
$(PYTHON) -m twine check dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
$(PYTHON) -m twine check dist/python_mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
git tag "v$(VERSION)"
git push --tags git@github.com:Mic92/python-mpd2 "v$(VERSION)"
$(PYTHON) -m twine upload --repository python-mpd2 dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
$(PYTHON) -m twine upload --repository python-mpd2 dist/python_mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
clean:
rm -rf dist build *.egg-info

Expand Down