File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 6
6
.dependencies.done.log
7
7
.git_submodule_init.done.log
8
8
.venv.done.log
9
+ .venv-pre-commit
9
10
vendor /bundle
10
11
venv
11
12
__pycache__
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/psf/black
3
+ rev : 22.3.0
4
+ hooks :
5
+ - id : black
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ $(error python3 not found)
23
23
endif
24
24
25
25
all : \
26
+ .venv-pre-commit/var/.pre-commit-built.log \
26
27
all-examples \
27
28
all-migration-0.2.0 \
28
29
all-ontology
@@ -71,6 +72,30 @@ all: \
71
72
--requirement requirements.txt
72
73
touch $@
73
74
75
+ # This virtual environment is meant to be built once and then persist, even through 'make clean'.
76
+ # If a recipe is written to remove this flag file, it should first run `pre-commit uninstall`.
77
+ .venv-pre-commit/var/.pre-commit-built.log :
78
+ rm -rf .venv-pre-commit
79
+ test -r .pre-commit-config.yaml \
80
+ || (echo " ERROR:Makefile:pre-commit is expected to install for this repository, but .pre-commit-config.yaml does not seem to exist." >&2 ; exit 1)
81
+ $(PYTHON3 ) -m venv \
82
+ .venv-pre-commit
83
+ source .venv-pre-commit/bin/activate \
84
+ && pip install \
85
+ --upgrade \
86
+ pip \
87
+ setuptools \
88
+ wheel
89
+ source .venv-pre-commit/bin/activate \
90
+ && pip install \
91
+ pre-commit
92
+ source .venv-pre-commit/bin/activate \
93
+ && pre-commit install
94
+ mkdir -p \
95
+ .venv-pre-commit/var
96
+ touch $@
97
+
98
+
74
99
all-examples : \
75
100
.dependencies.done.log
76
101
$(MAKE) \
@@ -86,6 +111,7 @@ all-ontology: \
86
111
--directory ontology
87
112
88
113
check : \
114
+ .venv-pre-commit/var/.pre-commit-built.log \
89
115
check-examples \
90
116
check-migration-0.2.0 \
91
117
check-ontology
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ exclude:
49
49
- vendor/ruby/
50
50
# customer excludes
51
51
- .venv.done.log
52
+ - .venv-pre-commit/
52
53
- CONTRIBUTE.md
53
54
- Makefile
54
55
- README.md
You can’t perform that action at this time.
0 commit comments