Skip to content

Commit

Permalink
TERA-1747: Move precommit config to parent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-wiffen committed Dec 17, 2024
1 parent d0df025 commit 0c35cf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
File renamed without changes.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ VENV_NAME?=.venv
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
PYTHON=${VENV_NAME}/bin/python
APP_VERSION=$(shell git describe --always --dirty)
PRECOMMIT_FILE=.pre-commit-config.yaml

# The below `awk` is a simple variation for self-documenting Makefiles. See:
# https://ricardoanderegg.com/posts/makefile-python-project-tricks/
Expand All @@ -32,7 +33,7 @@ $(VENV_NAME)/bin/activate: requirements.txt requirements-dev.txt
test -d ${VENV_NAME} || python -m venv ${VENV_NAME}
${PYTHON} -m pip install -U pip
${PYTHON} -m pip install -r requirements.txt -r requirements-dev.txt
${PYTHON} ${VENV_NAME}/bin/pre-commit install --config .github/pre-commit-config.yaml
${PYTHON} ${VENV_NAME}/bin/pre-commit install --config ${PRECOMMIT_FILE}
touch ${VENV_NAME}/bin/activate

.PHONY: test
Expand All @@ -59,4 +60,4 @@ docker-publish: docker ## Publish the the docker image

.PHONY: precommit
precommit: venv ## Run precommit hooks.
$(VENV_NAME)/bin/pre-commit run -c .github/pre-commit-config.yaml
$(VENV_NAME)/bin/pre-commit run -c ${PRECOMMIT_FILE}

0 comments on commit 0c35cf9

Please sign in to comment.