chore: add test for PHP version

This commit is contained in:
le0m
2021-10-19 17:52:52 +02:00
parent 54b0208694
commit c01244d604
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -48,6 +48,11 @@ test:
echo 'FAIL [Missing image!!!]'; \
exit 1; \
fi
@IMAGE_PHP_VERSION=`docker container run --rm $(IMAGE):$(VERSION) bash -c '/bin/echo $$PHP_VERSION' | cut -d '.' -f 1,2`; \
if [[ "$${IMAGE_PHP_VERSION}" != "$(PHP_VERSION)" ]]; then \
echo "FAIL [wrong PHP version: expected $(PHP_VERSION), got $${IMAGE_PHP_VERSION}]"; \
exit 1; \
fi
@modules=`docker container run --rm $(IMAGE):$(VERSION) php -m`; \
for ext in $(EXTENSIONS); do \
if [[ "$${modules}" != *"$${ext}"* ]]; then \