-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
38 lines (28 loc) · 1.28 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
NAME = sunfoxcz/php-build
VERSION = 2.0.0
.PHONY: all release clean
all: build
build: 7.4 8.0 8.1 8.2 8.3
7.4:
docker build -t $(NAME):7.4 --rm -f Dockerfile-7.4 .
8.0:
docker build -t $(NAME):8.0 --rm -f Dockerfile-8.0 .
8.1:
docker build -t $(NAME):8.1 --rm -f Dockerfile-8.1 .
8.2:
docker build -t $(NAME):8.2 --rm -f Dockerfile-8.2 .
8.3:
docker build -t $(NAME):8.3 --rm -f Dockerfile-8.3 .
release:
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F '7.4'; then echo "$(NAME):7.4 is not yet built. Please run 'make build'"; false; fi
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F '8.0'; then echo "$(NAME):8.0 is not yet built. Please run 'make build'"; false; fi
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F '8.1'; then echo "$(NAME):8.1 is not yet built. Please run 'make build'"; false; fi
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F '8.2'; then echo "$(NAME):8.2 is not yet built. Please run 'make build'"; false; fi
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F '8.3'; then echo "$(NAME):8.3 is not yet built. Please run 'make build'"; false; fi
docker push $(NAME):7.4
docker push $(NAME):8.0
docker push $(NAME):8.1
docker push $(NAME):8.2
docker push $(NAME):8.3
clean:
docker builder prune