forked from elastic/stack-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 729 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 729 Bytes
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
SHELL=/bin/bash
ifndef ELASTIC_VERSION
ELASTIC_VERSION=5.3.0
endif
export ELASTIC_VERSION
BRANCH=`echo $$ELASTIC_VERSION | egrep --only-matching '^[0-9]+[.][0-9]+'`
TARGETS := elasticsearch logstash kibana beats
images: $(TARGETS)
push: $(TARGETS:%=%-push)
clean: $(TARGETS:%=%-clean)
$(TARGETS): $(TARGETS:%=%-checkout)
(cd stack/$@ && make)
$(TARGETS:%=%-push): $(TARGETS:%=%-checkout)
(cd stack/$(@:%-push=%) && make push)
$(TARGETS:%=%-checkout):
test -d stack/$(@:%-checkout=%) || \
git clone https://github.com/elastic/$(@:%-checkout=%)-docker.git stack/$(@:%-checkout=%)
(cd stack/$(@:%-checkout=%) && git fetch && git reset --hard origin/$(BRANCH))
$(TARGETS:%=%-clean):
rm -rf stack/$(@:%-clean=%)