From 2e3adedcb1a00bce8c732f19ac655d99675cc440 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Thu, 9 Feb 2023 17:23:25 +0100
Subject: [PATCH] docker/gitlab-drupal-ci#20 Add support for PHP 8.2

---
 .gitlab-ci.yml    | 4 ++--
 run/scripts/reset | 2 ++
 run/scripts/start | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 00bb459..f0b7f54 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ include:
 
 variables:
   VERSION: ${CI_COMMIT_TAG}
-  CI_VERSION: v2.0.21
+  CI_VERSION: v2.1.0
 
 before_script:
   - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
@@ -34,7 +34,7 @@ php:
   stage: build
   parallel:
     matrix:
-      - PHP: ['7.4','8.0','8.1']
+      - PHP: ['7.4','8.0','8.1','8.2']
   script:
     - docker build --pull --build-arg PHP_VERSION=${PHP} --build-arg VERSION=${VERSION} --build-arg CI_VERSION=${CI_VERSION} -t ${CI_REGISTRY_IMAGE}/php-${PHP}:${VERSION} .
     - docker push ${CI_REGISTRY_IMAGE}/php-${PHP}:${VERSION}
diff --git a/run/scripts/reset b/run/scripts/reset
index e9e72c7..cf27d6f 100755
--- a/run/scripts/reset
+++ b/run/scripts/reset
@@ -19,6 +19,8 @@ export PHP_VERSION=8.0
 /usr/local/bin/update
 export PHP_VERSION=8.1
 /usr/local/bin/update
+export PHP_VERSION=8.2
+/usr/local/bin/update
 
 echo "Cleaning old container"
 docker kill l3drun >/dev/null
diff --git a/run/scripts/start b/run/scripts/start
index 00c4d7f..e5b580d 100755
--- a/run/scripts/start
+++ b/run/scripts/start
@@ -4,7 +4,7 @@ function getConfig() {
   if [[ ! -n ${PHP_VERSION} ]]; then
     while true; do
       DEFAULT=8.1
-      read -p "WhIich PHP version is your project using [7.1 - 7.4, 8.0 - 8.1]? " VALUE
+      read -p "WhIich PHP version is your project using [7.4, 8.0, 8.1, 8.2]? " VALUE
       if [[ "x$VALUE" == "x" ]]; then
         PHP_VERSION=$DEFAULT
       else
@@ -18,6 +18,7 @@ function getConfig() {
       7.4) break ;;
       8.0) break ;;
       8.1) break ;;
+      8.2) break ;;
       *) echo "Version not supported." ;;
       esac
     done
-- 
GitLab