forked from elastic/go-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 995 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
export ELASTICSEARCH_URL=http://elastic:elastic@localhost:9200
test:
@for file in ./*.go; do \
echo "go build -o /dev/null $$file"; \
go build -o /dev/null $$file; \
done;
test-integ:
@for file in ./*.go; do \
echo "go run $$file"; \
go run $$file; \
done;
certificates: certificates-clean
docker-compose --file certificates-create.yml run --rm create_certificates
cluster:
docker-compose --file elasticsearch-cluster.yml up --remove-orphans --detach; echo;
@docker-compose --file elasticsearch-cluster.yml ps;
@{ \
set -e; \
until \
docker inspect example_elasticsearch_1 > /dev/null 2>&1 && \
[[ `docker inspect -f "{{ .State.Health.Status }}" example_elasticsearch_1` == "healthy" ]]; \
do printf '-'; sleep 1; \
done; echo "> [OK]"; \
}
certificates-clean:
rm -rf ./certificates
cluster-clean:
docker-compose --file elasticsearch-cluster.yml down --volumes
setup:
.PHONY: test test-integ certificates cluster certificates-clean cluster-clean setup