initial commit
This commit is contained in:
28
template/Makefile.jinja
Normal file
28
template/Makefile.jinja
Normal file
@@ -0,0 +1,28 @@
|
||||
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 %}
|
||||
Reference in New Issue
Block a user