Don't run tests for PHP 8.1 on Alpine Linux 3.12

They don't update the PHP version on that image, it will remain at 8.1.0-alpha1
pull/272/head
Michele Locati 2021-06-30 10:10:18 +02:00
parent 1b0e76c32c
commit 497296eead
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 20 additions and 2 deletions

View File

@ -4,6 +4,22 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
# Check if we should use a specific PHP version for a specific distribution
#
# Arguments:
# $1: the distribution
# $2: the PHP version
shouldProcessPhpVersionForDistro() {
case "$2@$1" in
8.1@alpine3.12)
return 1
;;
*)
return 0
;;
esac
}
# Extract the extensions to be tested from commit messages # Extract the extensions to be tested from commit messages
# #
# Update: EXTENSIONS_TO_BE_TESTED # Update: EXTENSIONS_TO_BE_TESTED
@ -108,8 +124,11 @@ filterUnsupportedExensionsForDistro() {
# $2: the PHP version # $2: the PHP version
# #
# Outputs: # Outputs:
# the full docker image ID # the full docker image ID (if exists/is usable)
getDockerImageName() { getDockerImageName() {
if ! shouldProcessPhpVersionForDistro "$DOCKER_DISTRO" "$2"; then
return
fi
case "$2" in case "$2" in
8.1) 8.1)
getDockerImageName_version="$2-rc" getDockerImageName_version="$2-rc"
@ -141,7 +160,6 @@ getDockerImageName() {
getDockerImageName_log="$(docker pull "$getDockerImageName_imageName" 2>&1 || true)" getDockerImageName_log="$(docker pull "$getDockerImageName_imageName" 2>&1 || true)"
if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then
if test "${getDockerImageName_log#*manifest unknown}" != "$getDockerImageName_log" || test "${getDockerImageName_log#*manifest for * not found}" != "$getDockerImageName_log"; then if test "${getDockerImageName_log#*manifest unknown}" != "$getDockerImageName_log" || test "${getDockerImageName_log#*manifest for * not found}" != "$getDockerImageName_log"; then
true
return return
fi fi
printf '%s\n' "$getDockerImageName_log" >&2 printf '%s\n' "$getDockerImageName_log" >&2