mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
make: fix running fix target after verify
Define a Python virtual environment to install yamllint, if not installed locally, in a temporary directory and delete it after the run of the verify-yamllint command. This avoids the issue of building the build of materials that doesn't follow symlinks in the virtual environment directory. Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
parent
25367fc7e9
commit
0c134dd2c7
8
Makefile
8
Makefile
@ -125,9 +125,11 @@ verify-genproto:
|
||||
verify-yamllint:
|
||||
ifeq (, $(shell which yamllint))
|
||||
@echo "Installing yamllint..."
|
||||
python3 -m venv bin/python
|
||||
bin/python/bin/python3 -m pip install yamllint
|
||||
./bin/python/bin/yamllint --config-file tools/.yamllint .
|
||||
tmpdir=$$(mktemp -d); \
|
||||
trap "rm -rf $$tmpdir" EXIT; \
|
||||
python3 -m venv $$tmpdir; \
|
||||
$$tmpdir/bin/python3 -m pip install yamllint; \
|
||||
$$tmpdir/bin/yamllint --config-file tools/.yamllint .
|
||||
else
|
||||
@echo "yamllint already installed..."
|
||||
yamllint --config-file tools/.yamllint .
|
||||
|
Loading…
x
Reference in New Issue
Block a user