forked from hypothesis/h
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (52 loc) · 1.71 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
DOCKER_TAG = dev
GULP := node_modules/.bin/gulp
# Unless the user has specified otherwise in their environment, it's probably a
# good idea to refuse to install unless we're in an activated virtualenv.
ifndef PIP_REQUIRE_VIRTUALENV
PIP_REQUIRE_VIRTUALENV = 1
endif
export PIP_REQUIRE_VIRTUALENV
.PHONY: default
default: test
build/manifest.json: node_modules/.uptodate
$(GULP) build
## Clean up runtime artifacts (needed after a version update)
.PHONY: clean
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -f node_modules/.uptodate .pydeps
rm -rf build
## Run the development H server locally
.PHONY: dev
dev: build/manifest.json .pydeps
@bin/hypothesis --dev init
@bin/hypothesis devserver
## Build hypothesis/hypothesis docker image
.PHONY: docker
docker:
git archive HEAD | docker build -t hypothesis/hypothesis:$(DOCKER_TAG) -
## Run test suite
.PHONY: test
test: node_modules/.uptodate
@pip install -q tox
tox
$(GULP) test
################################################################################
# Fake targets to aid with deps installation
.pydeps: requirements.txt
@echo installing python dependencies
@pip install --use-wheel -r requirements-dev.in tox
@touch $@
node_modules/.uptodate: package.json
@echo installing javascript dependencies
@node_modules/.bin/check-dependencies 2>/dev/null || npm install
@touch $@
# Self documenting Makefile
.PHONY: help
help:
@echo "The following targets are available:"
@echo " clean Clean up runtime artifacts (needed after a version update)"
@echo " dev Run the development H server locally"
@echo " docker Build hypothesis/hypothesis docker image"
@echo " test Run the test suite (default)"