forked from gabrielfalcao/HTTPretty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.52 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
all: check_dependencies unit functional doctests
filename=httpretty-`python -c 'import httpretty;print httpretty.version'`.tar.gz
export HTTPRETTY_DEPENDENCIES:= nose sure
export PYTHONPATH:= ${PWD}
check_dependencies:
@echo "Checking for dependencies to run tests ..."
@for dependency in `echo $$HTTPRETTY_DEPENDENCIES`; do \
python -c "import $$dependency" 2>/dev/null || (echo "You must install $$dependency in order to run httpretty's tests" && exit 3) ; \
done
test: unit functional doctests
unit:
@echo "Running unit tests ..."
@nosetests -s --verbosity=2 --with-coverage --cover-erase --cover-inclusive tests/unit --cover-package=httpretty
functional:
@echo "Running functional tests ..."
@nosetests -s --verbosity=2 --with-coverage --cover-erase --cover-inclusive tests/functional --cover-package=httpretty
doctests:
@echo "Running documentation tests tests ..."
@steadymark README.md
clean:
@printf "Cleaning up files that are already in .gitignore... "
@for pattern in `cat .gitignore`; do rm -rf $$pattern; done
@echo "OK!"
release: clean unit functional
@echo "Releasing httpretty..."
@./.release
@python setup.py sdist register upload
docs: doctests
@markment -o . -t HTTPretty --sitemap-for="http://falcao.it/HTTPretty" .
@git co master && \
(git br -D gh-pages || printf "") && \
git checkout --orphan gh-pages && \
markment -o . -t HTTPretty --sitemap-for="http://falcao.it/HTTPretty" . && \
git add . && \
git commit -am 'documentation' && \
git push --force origin gh-pages && \
git checkout master