forked from django-es/django-elasticsearch-dsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (54 loc) · 1.76 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
65
66
67
68
69
70
.PHONY: help clean
define BROWSER_PYSCRIPT
import os, webbrowser, sys
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@echo "clean | Remove all build, test, coverage and Python artifacts"
@echo "clean-build | Remove build artifacts"
@echo "clean-pyc | Remove Python file artifacts"
@echo "clean-test | Remove test and coverage artifacts"
@echo "run | Run the project in Docker"
clean: clean-build clean-pyc clean-test
clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf static/CACHE
rm -rf builddocs/
rm -rf builddocs.zip
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -rf .pytest_cache; \
rm -rf .ipython/profile_default; \
rm -rf htmlcov; \
rm -rf build; \
rm -f .coverage; \
rm -f coverage.xml; \
rm -f junit.xml; \
rm -rf .hypothesis; \
find . -name '*.py,cover' -exec rm -f {} +
test-elasticsearch:
ANYSEARCH_PREFERRED_BACKEND=Elasticsearch python runtests.py
test-opensearch:
ANYSEARCH_PREFERRED_BACKEND=OpenSearch python runtests.py
tox-elasticsearch:
ANYSEARCH_PREFERRED_BACKEND=Elasticsearch tox -r
tox-opensearch:
ANYSEARCH_PREFERRED_BACKEND=OpenSearch tox -r -c tox_opensearch.ini
release:
python setup.py register
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
build-docs:
sphinx-build -n -a -b html docs/source builddocs
cd builddocs && zip -r ../builddocs.zip . -x ".*" && cd ..
rebuild-docs:
sphinx-apidoc django_elasticsearch_dsl --full -o docs -H 'django-anysearch-dsl' -A 'Artur Barseghyan <[email protected]>' -f -d 20