From a6e27c1dcd457f4c720eba79aab1f589915c00b2 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 16 May 2021 17:04:11 +0200 Subject: [PATCH] Fix work issues for PHP 7.0 and 7.1 --- Dockerfiles/work/Dockerfile-7.0 | 19 ++++++++++++++----- Dockerfiles/work/Dockerfile-7.1 | 19 ++++++++++++++----- build/ansible/group_vars/all/work.yml | 4 ++-- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 7186dd9..ceeb6d1 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -213,10 +213,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/misc \ \ \ -# -------------------- drupalconsole -------------------- - && DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \ - && curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \ - && chmod +x /usr/local/bin/drupal \ +# -------------------- drush9 -------------------- + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ + \ \ # -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -557,7 +566,7 @@ RUN set -eux \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \ - && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && git-flow version | grep -E '[0-9][.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index daa7360..1d38390 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -212,10 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/misc \ \ \ -# -------------------- drupalconsole -------------------- - && DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \ - && curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \ - && chmod +x /usr/local/bin/drupal \ +# -------------------- drush9 -------------------- + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ +&& cd /usr/local/src/drush9 \ +&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ +&& rm -rf /usr/local/src/drush9/.git \ +&& rm -rf /usr/local/src/drush9/docs \ +&& rm -rf /usr/local/src/drush9/examples \ +&& rm -rf /usr/local/src/drush9/misc \ + \ \ # -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -556,7 +565,7 @@ RUN set -eux \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \ - && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \ + && drush9 --version | grep -E '9[.0-9]+\s*$' \ && git-flow version | grep -E '[0-9][.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \ diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index bd55f9e..4248e92 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -500,7 +500,7 @@ software_available: && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ drush9: - disabled: [5.2, 5.3, 5.4, 5.5, 7.0, 7.1, 8.0, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 8.0, 8.1] check: drush9 --version | grep -E '9[.0-9]+\s*$' all: pre: | @@ -516,7 +516,7 @@ software_available: && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ drupalconsole: - disabled: [5.2, 5.3, 5.4, 8.0, 8.1] # TODO: re-enable for 8.0 (currently errors) + disabled: [5.2, 5.3, 5.4, 7.0, 7.1, 8.0, 8.1] # TODO: re-enable for 8.0 (currently errors) check: drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' 5.5: pre: DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar"