.ONESHELL: .PHONY: issetup issetup: @[ -f .git/hooks/commit-msg ] || [ -z ${SKIP_MAKE_SETUP_CHECK+x} ] || (echo "You must run 'make setup' first to initialize the repo!" && exit 1) .PHONY: setup setup: @cp .gitea/conventional_commits/commit-msg .git/hooks/ .PHONY: help help: ## Show the help. @echo "Usage: make " @echo "" @echo "Targets:" @fgrep "##" Makefile | fgrep -v fgrep .PHONY: fmt fmt: issetup ## Format code using black & isort. $(ENV_PREFIX)isort project_name/ $(ENV_PREFIX)black -l 79 project_name/ $(ENV_PREFIX)black -l 79 tests/ .PHONY: lint lint: issetup ## Run pep8, black, mypy linters. $(ENV_PREFIX)flake8 project_name/ $(ENV_PREFIX)black -l 79 --check project_name/ $(ENV_PREFIX)black -l 79 --check tests/ $(ENV_PREFIX)mypy --ignore-missing-imports project_name/ .PHONY: release release: issetup ## Create a new tag for release. @./.gitea/conventional_commits/generate-version.sh .PHONY: build build: issetup ## Create a new tag for release. @docker build -t project_name:$(cat project_name/VERSION) -f Containerfile . # This project has been generated from rochacbruno/python-project-template # __author__ = 'rochacbruno' # __repo__ = https://github.com/rochacbruno/python-project-template # __sponsor__ = https://github.com/sponsors/rochacbruno/