From fd68fc2050db99c894eafba8ca77555ba02dc731 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Fri, 25 Aug 2023 17:51:38 -0300 Subject: [PATCH] Drush 12 is no longer compatiable with Drush launcher. (#286) --- drupal/Dockerfile | 14 -------------- drupal/rootfs/usr/local/bin/drush | 4 ++-- drupal/tests/ServiceStartsWithBackendMySQL/test.sh | 4 ++-- .../ServiceStartsWithBackendPostgreSQL/test.sh | 4 ++-- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/drupal/Dockerfile b/drupal/Dockerfile index 2182c228..41b97e4e 100644 --- a/drupal/Dockerfile +++ b/drupal/Dockerfile @@ -2,25 +2,11 @@ FROM nginx ARG TARGETARCH -ARG DRUSH_VERSION="0.10.2" -ARG DRUSH_FILE="drush.phar" -ARG DRUSH_URL="https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_VERSION}/${DRUSH_FILE}" -ARG DRUSH_SHA256="0ae18cd3f8745fdd58ab852481b89428b57be6523edf4d841ebef198c40271be" EXPOSE 80 WORKDIR /var/www/drupal -# Platform agnostic does not require arch specific identifier. -RUN --mount=type=cache,id=drupal-downloads-${TARGETARCH},sharing=locked,target=/opt/downloads \ - download.sh \ - --url "${DRUSH_URL}" \ - --sha256 "${DRUSH_SHA256}" \ - && \ - cp "${DOWNLOAD_CACHE_DIRECTORY}/${DRUSH_FILE}" /usr/bin/drush && \ - chmod a+x /usr/bin/drush && \ - cleanup.sh - # Platform specific does require arch specific identifier. RUN --mount=type=cache,id=drupal-apk-${TARGETARCH},sharing=locked,target=/var/cache/apk \ apk add \ diff --git a/drupal/rootfs/usr/local/bin/drush b/drupal/rootfs/usr/local/bin/drush index 1c522095..cba50aee 100755 --- a/drupal/rootfs/usr/local/bin/drush +++ b/drupal/rootfs/usr/local/bin/drush @@ -6,9 +6,9 @@ set -e # regardless of which shell is used or how it is started (login, interactive, etc) if test "$(id -u)" -eq 0; then # If root run as nginx. - s6-setuidgid nginx php -d memory_limit=-1 /usr/bin/drush "${@}" + s6-setuidgid nginx php -d memory_limit=-1 /var/www/drupal/vendor/bin/drush "${@}" else # If non-root user, then run as current user # as we do not have permissions to switch user. - php -d memory_limit=-1 /usr/bin/drush "${@}" + php -d memory_limit=-1 /var/www/drupal/vendor/bin/drush "${@}" fi diff --git a/drupal/tests/ServiceStartsWithBackendMySQL/test.sh b/drupal/tests/ServiceStartsWithBackendMySQL/test.sh index 79bc4b5a..b81e0255 100755 --- a/drupal/tests/ServiceStartsWithBackendMySQL/test.sh +++ b/drupal/tests/ServiceStartsWithBackendMySQL/test.sh @@ -7,7 +7,7 @@ source /usr/local/share/isle/utilities.sh # Install basic Drupal cd /var/www/drupal || exit 1 rm -fr /var/www/drupal/* -composer create-project drupal/recommended-project:^9.4 \ +composer create-project drupal/recommended-project:^10.1.2 \ --prefer-dist \ --no-interaction \ --stability stable \ @@ -15,7 +15,7 @@ composer create-project drupal/recommended-project:^9.4 \ -- /var/www/drupal # Install Drush. -composer require drush/drush:^11.0 +composer require drush/drush:^12.1.3 # Install actual site. # shellcheck disable=SC1091 diff --git a/drupal/tests/ServiceStartsWithBackendPostgreSQL/test.sh b/drupal/tests/ServiceStartsWithBackendPostgreSQL/test.sh index c52e770b..5f64bb2a 100755 --- a/drupal/tests/ServiceStartsWithBackendPostgreSQL/test.sh +++ b/drupal/tests/ServiceStartsWithBackendPostgreSQL/test.sh @@ -7,7 +7,7 @@ source /usr/local/share/isle/utilities.sh # Install basic Drupal cd /var/www/drupal || exit 1 rm -fr /var/www/drupal/* -composer create-project drupal/recommended-project:^9.4 \ +composer create-project drupal/recommended-project:^10.1.2 \ --prefer-dist \ --no-interaction \ --stability stable \ @@ -15,7 +15,7 @@ composer create-project drupal/recommended-project:^9.4 \ -- /var/www/drupal # Install Drush. -composer require drush/drush:^11.0 +composer require drush/drush:^12.1.3 # Install actual site. # shellcheck disable=SC1091