mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Rebuild virtualenv on requirements change.
This commit is contained in:
parent
969170bf67
commit
2bfb85e52e
2 changed files with 15 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
.tox
|
.tox
|
||||||
|
.venv.touch
|
||||||
/venv*
|
/venv*
|
||||||
coverage-html
|
coverage-html
|
||||||
dist
|
dist
|
||||||
|
|
|
||||||
18
Makefile
18
Makefile
|
|
@ -1,17 +1,27 @@
|
||||||
|
|
||||||
|
REBUILD_FLAG =
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: venv test
|
all: venv test
|
||||||
|
|
||||||
.PHONY: venv
|
.PHONY: venv
|
||||||
venv:
|
venv: .venv.touch
|
||||||
tox -e venv
|
tox -e venv $(REBUILD_FLAG)
|
||||||
|
|
||||||
.PHONY: tests test
|
.PHONY: tests test
|
||||||
tests: test
|
tests: test
|
||||||
test:
|
test: .venv.touch
|
||||||
tox
|
tox $(REBUILD_FLAG)
|
||||||
|
|
||||||
|
|
||||||
|
.venv.touch: setup.py requirements.txt requirements_dev.txt
|
||||||
|
$(eval REBUILD_FLAG := --recreate)
|
||||||
|
touch .venv.touch
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
find . -iname '*.pyc' | xargs rm -f
|
find . -iname '*.pyc' | xargs rm -f
|
||||||
rm -rf .tox
|
rm -rf .tox
|
||||||
rm -rf ./venv-*
|
rm -rf ./venv-*
|
||||||
|
rm -f .venv.touch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue