Skip to content

Commit

Permalink
Drush 12 is no longer compatiable with Drush launcher. (Islandora-Dev…
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Aug 25, 2023
1 parent e4883dc commit 7d6c26f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
14 changes: 0 additions & 14 deletions drupal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions drupal/rootfs/usr/local/bin/drush
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions drupal/tests/ServiceStartsWithBackendMySQL/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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 \
--no-dev \
-- /var/www/drupal

# Install Drush.
composer require drush/drush:^11.0
composer require drush/drush:^12.1.3

# Install actual site.
# shellcheck disable=SC1091
Expand Down
4 changes: 2 additions & 2 deletions drupal/tests/ServiceStartsWithBackendPostgreSQL/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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 \
--no-dev \
-- /var/www/drupal

# Install Drush.
composer require drush/drush:^11.0
composer require drush/drush:^12.1.3

# Install actual site.
# shellcheck disable=SC1091
Expand Down

0 comments on commit 7d6c26f

Please sign in to comment.