cli/makefile

40 lines
716 B
Makefile
Raw Permalink Normal View History

2022-10-29 23:55:22 +02:00
.PHONY: setup-dev flake8 isort isort-fix mypy lint build clean
2021-07-30 11:48:32 +02:00
NAME = ytrssil
2022-10-29 23:55:22 +02:00
FILES_PY = $(shell find $(CURDIR)/$(NAME) -type f -name "*.py")
2021-07-30 11:48:32 +02:00
setup-dev:
pip install -r requirements-dev.txt
pip install -e .
flake8:
@flake8 $(FILES_PY)
isort:
@isort -c $(FILES_PY)
2022-10-29 23:55:22 +02:00
isort-fix:
@isort $(FILES_PY)
mypy:
@mypy --strict $(FILES_PY)
2021-07-30 11:48:32 +02:00
2022-10-29 23:55:22 +02:00
lint: flake8 isort mypy
2021-08-06 00:07:30 +02:00
build:
python setup.py sdist bdist_wheel
2021-08-06 00:07:30 +02:00
clean:
rm -rf $(CURDIR)/build
rm -rf $(CURDIR)/dist
rm -rf $(CURDIR)/$(NAME).egg-info
2022-10-30 12:08:51 +01:00
publish:
@git checkout $(shell git tag | sort -V | tail -n1) >/dev/null 2>&1
@$(MAKE) clean > /dev/null
@$(MAKE) build > /dev/null
@twine upload dist/*
@$(MAKE) clean > /dev/null
@git switch main >/dev/null 2>&1