mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
Rebuild virtualenv on requirements change.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@
|
||||
.project
|
||||
.pydevproject
|
||||
.tox
|
||||
.venv.touch
|
||||
/venv*
|
||||
coverage-html
|
||||
dist
|
||||
|
||||
18
Makefile
18
Makefile
@@ -1,17 +1,27 @@
|
||||
|
||||
REBUILD_FLAG =
|
||||
|
||||
.PHONY: all
|
||||
all: venv test
|
||||
|
||||
.PHONY: venv
|
||||
venv:
|
||||
tox -e venv
|
||||
venv: .venv.touch
|
||||
tox -e venv $(REBUILD_FLAG)
|
||||
|
||||
.PHONY: tests test
|
||||
tests: test
|
||||
test:
|
||||
tox
|
||||
test: .venv.touch
|
||||
tox $(REBUILD_FLAG)
|
||||
|
||||
|
||||
.venv.touch: setup.py requirements.txt requirements_dev.txt
|
||||
$(eval REBUILD_FLAG := --recreate)
|
||||
touch .venv.touch
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
find . -iname '*.pyc' | xargs rm -f
|
||||
rm -rf .tox
|
||||
rm -rf ./venv-*
|
||||
rm -f .venv.touch
|
||||
|
||||
Reference in New Issue
Block a user