Only install pre-commit in setup-development-environment
parent
477ef83319
commit
a5afed584f
8
Makefile
8
Makefile
|
|
@ -1,14 +1,18 @@
|
|||
POETRY_EXISTS := $(shell which poetry &> /dev/null)
|
||||
PRE_COMMIT_EXISTS := $(shell poetry run which pre-commit &> /dev/null)
|
||||
PRE_COMMIT_HOOK := .git/hooks/pre-commit
|
||||
|
||||
pre-commit:
|
||||
pre-commit: setup-development-environment
|
||||
poetry run pre-commit
|
||||
|
||||
install-poetry:
|
||||
ifndef POETRY_EXISTS
|
||||
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.4.0 python3 -
|
||||
endif
|
||||
poetry install
|
||||
|
||||
ifndef PRE_COMMIT_EXISTS
|
||||
poetry run pip install $(shell poetry export --without-hashes --with dev | grep pre-commit | cut -d";" -f1)
|
||||
endif
|
||||
|
||||
$(PRE_COMMIT_HOOK):
|
||||
poetry run pre-commit install --install-hooks
|
||||
|
|
|
|||
Loading…
Reference in New Issue