Files
esta-python-template/template/Makefile.jinja
2025-10-11 17:03:02 +02:00

29 lines
669 B
Django/Jinja

all: setup_environment
clean:
poetry run pre-commit uninstall
rm -rf .venv
setup_environment: check
pyenv install {{ python_version }} --skip-existing \
&& pyenv local {{ python_version }} \
&& poetry env use {{ python_version }} \
&& poetry install \
&& poetry run pre-commit install
check: pyenv_exists poetry_exists is_git {{- " ggshield_has_key" if use_ggshield else ""}}
pyenv_exists: ; @which pyenv > /dev/null
poetry_exists: ; @which poetry > /dev/null
is_git: ; @git rev-parse --git-dir > /dev/null
{%- if use_ggshield %}
ggshield_has_key:
ifeq ($(GITGUARDIAN_API_KEY),)
$(warning No API-Key for GitGuardian was set!)
endif
{%- endif %}