You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This dedicated virtual environment is intended to persist through
`make clean`, not disrupting the ability to run regular Git commits if
the "primary" virtual environment is removed. The `pre-commit`
experience it produces should align make- and local-venv-oriented users
with users who have a more global availability of `pre-commit`.
References:
* casework/CASE-Utilities-Python#37
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Copy file name to clipboardExpand all lines: Makefile
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ SHELL := /bin/bash
16
16
PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)
17
17
18
18
all: \
19
-
.dependencies.done.log
19
+
.dependencies.done.log \
20
+
.venv-pre-commit/var/.pre-commit-built.log
20
21
$(MAKE) \
21
22
--directory examples/illustrations
22
23
@@ -64,6 +65,29 @@ all: \
64
65
.lib.done.log
65
66
touch $@
66
67
68
+
# This virtual environment is meant to be built once and then persist, even through 'make clean'.
69
+
# If a recipe is written to remove this flag file, it should first run `pre-commit uninstall`.
70
+
.venv-pre-commit/var/.pre-commit-built.log:
71
+
rm -rf .venv-pre-commit
72
+
test -r .pre-commit-config.yaml \
73
+
|| (echo "ERROR:Makefile:pre-commit is expected to install for this repository, but .pre-commit-config.yaml does not expect to exist.">&2;exit 1)
0 commit comments