From c0a2a29a6e6fb646b36548d8f0d331b81bfed9e3 Mon Sep 17 00:00:00 2001 From: Alexander Akhmetov Date: Sun, 23 Jun 2024 18:11:46 +0200 Subject: [PATCH] Fix Makefile --- Makefile | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 755af2c9..cd0f456a 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,37 @@ -docker-build: +.PHONY: docker/build +docker/build: docker build -f Dockerfile . -t akhmetov/python-telegram -docker-send-message: +.PHONY: docker/send-message +docker/send-message: docker run -i -t \ -v /tmp/docker-python-telegram/:/tmp/ \ akhmetov/python-telegram \ python3 /app/examples/send_message.py $(API_ID) $(API_HASH) $(PHONE) $(CHAT_ID) $(TEXT) -docker-echo-bot: +.PHONY: docker/echo-bot +docker/echo-bot: docker run -i -t \ -v /tmp/docker-python-telegram/:/tmp/ \ akhmetov/python-telegram \ python3 /app/examples/echo_bot.py $(API_ID) $(API_HASH) $(PHONE) -docker-get-instant-view: +.PHONY: docker/get-instant-view +docker/get-instant-view: docker run -i -t \ -v /tmp/docker-python-telegram/:/tmp/ \ akhmetov/python-telegram \ python3 /app/examples/echo_bot.py $(API_ID) $(API_HASH) $(PHONE) -release-pypi: - test -n "$(VERSION)" - python setup.py sdist - twine upload dist/python-telegram-$(VERSION).tar.gz +.PHONY: clean +clean: + rm -rf dist + +.PHONY: build-pypi +build-pypi: clean + python3 -m build + +.PHONY: release-pypi +release-pypi:build-pypi + twine upload dist/*