From 95a42a6b750f3e7a317500c05fd73d21c18d3d53 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 22 Oct 2017 18:36:13 +0300 Subject: [PATCH] Add Makefile --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c3bef0fc --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +VENV_NAME := venv +PYTHON := $(VENV_NAME)/bin/python + +mkvenv: + virtualenv $(VENV_NAME) + $(PYTHON) -m pip install -r requirements.txt + +clean: + find . -name '*.pyc' -exec rm --force {} + + find . -name '*.pyo' -exec rm --force {} + + find . -name '*~' -exec rm --force {} + + rm --force --recursive build/ + rm --force --recursive dist/ + rm --force --recursive *.egg-info + +tag: + AIOGRAM_VERSION := $(shell $(PYTHON) -c "import aiogram;print(aiogram.__version__)") + @echo "Add tag: '$(AIOGRAM_VERSION)'" + git tag v$(AIOGRAM_VERSION) + +build: + $(PYTHON) setup.py sdist bdist_wheel + +upload: + twine upload dist/* + +release: + AIOGRAM_VERSION := $(shell $(PYTHON) -c "import aiogram;print(aiogram.__version__)") + make clean + make tag + make build + @echo "Released aiogram $(AIOGRAM_VERSION)" + +full-release: + make release + make upload