Skip to content

Commit 14ea9b1

Browse files
committed
refactor: extract version number to variable
1 parent a701fc3 commit 14ea9b1

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

Makefile

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1+
.PHONY: build all all-nc
2+
3+
VERSIONS = 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
14

25
build: all
36

47
all:
5-
docker build -f ./Dockerfile-5.6 -t php-fpm:dev-5.6 .
6-
docker build -f ./Dockerfile-7.0 -t php-fpm:dev-7.0 .
7-
docker build -f ./Dockerfile-7.1 -t php-fpm:dev-7.1 .
8-
docker build -f ./Dockerfile-7.2 -t php-fpm:dev-7.2 .
9-
docker build -f ./Dockerfile-7.3 -t php-fpm:dev-7.3 .
10-
docker build -f ./Dockerfile-7.4 -t php-fpm:dev-7.4 .
11-
docker build -f ./Dockerfile-8.0 -t php-fpm:dev-8.0 .
12-
docker build -f ./Dockerfile-8.1 -t php-fpm:dev-8.1 .
13-
docker build -f ./Dockerfile-8.2 -t php-fpm:dev-8.2 .
14-
docker build -f ./Dockerfile-8.3 -t php-fpm:dev-8.3 .
15-
docker build -f ./Dockerfile-8.4 -t php-fpm:dev-8.4 .
8+
@for v in $(VERSIONS); do \
9+
docker build -f ./Dockerfile-$$v -t php-fpm:dev-$$v . ; \
10+
done
1611

1712
all-nc:
18-
docker build -f ./Dockerfile-5.6 -t php-fpm:dev-5.6 --no-cache --pull .
19-
docker build -f ./Dockerfile-7.0 -t php-fpm:dev-7.0 --no-cache --pull .
20-
docker build -f ./Dockerfile-7.1 -t php-fpm:dev-7.1 --no-cache --pull .
21-
docker build -f ./Dockerfile-7.2 -t php-fpm:dev-7.2 --no-cache --pull .
22-
docker build -f ./Dockerfile-7.3 -t php-fpm:dev-7.3 --no-cache --pull .
23-
docker build -f ./Dockerfile-7.4 -t php-fpm:dev-7.4 --no-cache --pull .
24-
docker build -f ./Dockerfile-8.0 -t php-fpm:dev-8.0 --no-cache --pull .
25-
docker build -f ./Dockerfile-8.1 -t php-fpm:dev-8.1 --no-cache --pull .
26-
docker build -f ./Dockerfile-8.2 -t php-fpm:dev-8.2 --no-cache --pull .
27-
docker build -f ./Dockerfile-8.3 -t php-fpm:dev-8.3 --no-cache --pull .
28-
docker build -f ./Dockerfile-8.4 -t php-fpm:dev-8.4 --no-cache --pull .
13+
@for v in $(VERSIONS); do \
14+
docker build -f ./Dockerfile-$$v -t php-fpm:dev-$$v --no-cache --pull . ; \
15+
done

0 commit comments

Comments
 (0)