-
Notifications
You must be signed in to change notification settings - Fork 290
/
Makefile
40 lines (29 loc) · 888 Bytes
/
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
.PHONY: all production test docs clean
COMPOSE = "-compose"
$(which shell && shell docker$(COMPOSE) 2> /dev/null)
ifneq ($(.SHELLSTATUS),0)
COMPOSE = " compose"
endif
all: production
production:
@true
docs:
tox -c tests/tox.ini -e docs
dev: $(LOCAL_CONFIG_DIR) $(LOGS_DIR) install-hooks
install-hooks:
pre-commit install -f --install-hooks
test:
tox -c tests/tox.ini
test-elasticsearch:
tox -c tests/tox.ini -- --runelasticsearch
test-docker:
$(shell echo docker$(COMPOSE)) -f tests/docker-compose.yml --project-name elastalert build tox
$(shell echo docker$(COMPOSE)) -f tests/docker-compose.yml --project-name elastalert run --rm tox \
tox -c tests/tox.ini -- $(filter-out $@,$(MAKECMDGOALS))
clean:
make -C docs clean
find . -name '*.pyc' -delete
find . -name '__pycache__' -delete
rm -rf virtualenv_run tests/.tox tests/.coverage *.egg-info docs/build
%:
@: