-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
30 lines (24 loc) · 959 Bytes
/
Makefile.in
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
# vim: noexpandtab:ts=4:sw=4
SHELL=/bin/bash
.PHONY: build fetch-latest push
build: fetch-latest
set -x; \
for version in $(feature_version); do \
export relver=$${version//.[Mv]*/}; \
export hrelver=$${relver//./-}; \
tar -czh . | docker build $$build_args -t $(provider)/$(image)\:$${hrelver}-$(release)-$(tag) - && \
docker tag $(provider)/$(image)\:$${hrelver}-$(release)-$(tag) $(provider)/$(image)\:$${hrelver}-$(release)-latest; \
done
fetch-latest:
for version in $(feature_version); do \
export relver=$${version//.[Mv]*/}; \
export hrelver=$${relver//./-}; \
docker pull $(provider)/$(image):$${hrelver}-$(release)-latest || true; \
done
push: build
for version in $(feature_version); do \
export relver=$${version//.[Mv]*/}; \
export hrelver=$${relver//./-}; \
docker push $(provider)/$(image)\:$${hrelver}-$(release)-$(tag) && \
docker push $(provider)/$(image)\:$${hrelver}-$(release)-latest; \
done