@@ -35,63 +35,50 @@ default: docker-images layers
3535
3636
3737# Build Docker images *locally*
38- docker-images : docker-images-php-80 docker-images-php-81 docker-images-php- 82 docker-images-php-83 docker-images-php-84
38+ docker-images : docker-images-php-82 docker-images-php-83 docker-images-php-84
3939docker-images-php-% :
4040 PHP_VERSION=$* ${BAKE_COMMAND} --load
4141
4242
4343# Build Lambda layers (zip files) *locally*
44- layers : layer-php-80 layer-php-81 layer-php-82 layer-php-83 layer-php-84 layer-php-80-fpm layer-php-81-fpm layer-php-82-fpm layer-php-83-fpm layer-php-84-fpm
45- # Build the console layer only once (x86 and single PHP version)
46- @if [ ${CPU} = " x86" ]; then \
47- $(MAKE ) layer-console; \
48- fi
49- layer-console :
50- ./utils/docker-zip-dir.sh bref/console-zip console
51- # This rule matches with a wildcard, for example `layer-php-80`.
52- # The `$*` variable will contained the matched part, in this case `php-80`.
44+ layers : layer-php-82 layer-php-83 layer-php-84
45+ # This rule matches with a wildcard, for example `layer-php-84`.
46+ # The `$*` variable will contained the matched part, in this case `php-84`.
5347layer-% :
5448 ./utils/docker-zip-dir.sh bref/${CPU_PREFIX} $* ${CPU_PREFIX} $*
5549
5650
5751# Upload the layers to AWS Lambda
5852# Uses the current AWS_PROFILE. Most users will not want to use this option
5953# as this will publish all layers to all regions + publish all Docker images.
60- upload-layers : upload-layers-php-80 upload-layers-php-81 upload-layers-php-82 upload-layers-php-83 upload-layers-php-84
61- # Upload the console layer only once (x86 and single PHP version)
62- @if [ ${CPU} = " x86" ]; then \
63- LAYER_NAME=console $(MAKE ) -C ./utils/lambda-publish publish-parallel; \
64- fi
54+ upload-layers : upload-layers-php-82 upload-layers-php-83 upload-layers-php-84
6555upload-layers-php-% :
66- # Upload the function layers to AWS
6756 LAYER_NAME=${CPU_PREFIX} php-$* $(MAKE ) -C ./utils/lambda-publish publish-parallel
68- # Upload the FPM layers to AWS
69- LAYER_NAME=${CPU_PREFIX} php-$* -fpm $(MAKE ) -C ./utils/lambda-publish publish-parallel
7057
7158
7259# Publish Docker images to Docker Hub.
73- upload-to-docker-hub : upload-to-docker-hub-php-80 upload-to-docker-hub-php-81 upload-to-docker-hub-php- 82 upload-to-docker-hub-php-83 upload-to-docker-hub-php-84
60+ upload-to-docker-hub : upload-to-docker-hub-php-82 upload-to-docker-hub-php-83 upload-to-docker-hub-php-84
7461upload-to-docker-hub-php-% :
7562 # Make sure we have defined the docker tag
7663 (test $(DOCKER_TAG)) && echo "Tagging images with \"${DOCKER_TAG}\"" || echo "You have to define environment variable DOCKER_TAG"
7764 test $(DOCKER_TAG)
7865
66+ set -e ; \
7967 for image in \
80- "bref/${CPU_PREFIX}php-$*" "bref/${CPU_PREFIX}php-$*-fpm" "bref/${CPU_PREFIX}php-$*-console" \
81- "bref/${CPU_PREFIX}build-php-$*" "bref/${CPU_PREFIX}php-$*-fpm-dev"; \
68+ "bref/${CPU_PREFIX}php-$*" "bref/${CPU_PREFIX}build-php-$*" "bref/${CPU_PREFIX}php-$*-dev"; \
8269 do \
8370 docker tag $$image $$image:2 ; \
8471 docker tag $$image $$image:${DOCKER_TAG} ; \
8572 docker push $$image --all-tags ; \
8673 done
8774
8875
89- test : test-80 test-81 test- 82 test-83 test-84
76+ test : test-82 test-83 test-84
9077test-% :
9178 cd tests && $(MAKE ) test-$*
9279
9380
94- clean : clean-80 clean-81 clean- 82 clean-83 clean-84
81+ clean : clean-82 clean-83 clean-84
9582 # Clear the build cache, else all images will be rebuilt using cached layers
9683 docker builder prune
9784 # Remove zip files
@@ -101,7 +88,4 @@ clean-%:
10188 docker image rm --force bref/${CPU_PREFIX} build-php-$* \
10289 bref/${CPU_PREFIX} php-$* \
10390 bref/${CPU_PREFIX} php-$* -zip \
104- bref/${CPU_PREFIX} php-$* -fpm \
105- bref/${CPU_PREFIX} php-$* -fpm-zip \
106- bref/${CPU_PREFIX} php-$* -fpm-dev \
107- bref/${CPU_PREFIX} php-$* -console
91+ bref/${CPU_PREFIX} php-$* -dev
0 commit comments