Add tag command to Makefile

This commit is contained in:
Dan 2022-11-18 12:14:31 +01:00
parent e3e9731973
commit 2aae10193e

View File

@ -1,6 +1,7 @@
VENV := venv VENV := venv
PYTHON := $(VENV)/bin/python PYTHON := $(VENV)/bin/python
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2) HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)
RM := rm -rf RM := rm -rf
@ -30,4 +31,12 @@ api:
build: build:
make clean make clean
$(PYTHON) setup.py sdist $(PYTHON) setup.py sdist
$(PYTHON) setup.py bdist_wheel $(PYTHON) setup.py bdist_wheel
tag:
git tag $(TAG)
git push origin $(TAG)
dtag:
git tag -d $(TAG)
git push origin -d $(TAG)