From 9df90b35008d0b4338d3a43fe489aa46ff7ceaf3 Mon Sep 17 00:00:00 2001 From: Valeriy Date: Wed, 5 Oct 2022 17:11:59 +0300 Subject: [PATCH] symfony cli new way of install (from symfony-cli/symfony-cli) --- Dockerfiles/work/Dockerfile-5.4 | 10 ++++++---- Dockerfiles/work/Dockerfile-5.5 | 10 ++++++---- Dockerfiles/work/Dockerfile-5.6 | 10 ++++++---- Dockerfiles/work/Dockerfile-7.0 | 10 ++++++---- Dockerfiles/work/Dockerfile-7.1 | 10 ++++++---- Dockerfiles/work/Dockerfile-7.2 | 10 ++++++---- Dockerfiles/work/Dockerfile-7.3 | 10 ++++++---- Dockerfiles/work/Dockerfile-7.4 | 10 ++++++---- Dockerfiles/work/Dockerfile-8.0 | 10 ++++++---- Dockerfiles/work/Dockerfile-8.1 | 10 ++++++---- Dockerfiles/work/Dockerfile-8.2 | 10 ++++++---- build/ansible/group_vars/all/work.yml | 10 ++++++---- 12 files changed, 72 insertions(+), 48 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 85b5c80..5174115 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -347,9 +347,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ @@ -755,7 +757,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index e148e0e..159f5c9 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -353,9 +353,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ @@ -770,7 +772,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index a168b27..98e66e0 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -373,9 +373,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -788,7 +790,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index baf9ed0..61dfb18 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -354,9 +354,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -767,7 +769,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 25b8104..556eaf2 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -347,9 +347,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -760,7 +762,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 4cb98c2..c08eb43 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -367,9 +367,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -782,7 +784,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 1b8cc9a..397555e 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -368,9 +368,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -783,7 +785,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index fdd3b05..0f8eb1b 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -368,9 +368,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -783,7 +785,7 @@ fi \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index a29639f..1f8398d 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -302,9 +302,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -696,7 +698,7 @@ fi \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 index 57c4b0a..3501ac2 100644 --- a/Dockerfiles/work/Dockerfile-8.1 +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -302,9 +302,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -696,7 +698,7 @@ fi \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/Dockerfiles/work/Dockerfile-8.2 b/Dockerfiles/work/Dockerfile-8.2 index 4a2508d..83ce2e6 100644 --- a/Dockerfiles/work/Dockerfile-8.2 +++ b/Dockerfiles/work/Dockerfile-8.2 @@ -286,9 +286,11 @@ fi \ \ \ # -------------------- symfony -------------------- - && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ - && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony \ - && chmod +x /usr/local/bin/symfony \ + && VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" \ + && curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ +&& dpkg -i /tmp/symfonycli.deb \ +&& rm -f /tmp/symfonycli.deb \ + \ \ # -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ @@ -678,7 +680,7 @@ fi \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ - && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s[0-9][.0-9]+' \ && if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \ && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ \ diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 08315ea..4635893 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -1300,11 +1300,13 @@ software_available: && chmod +x /usr/local/bin/phpunit \ symfony: disabled: [5.2, 5.3] - check: symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' + check: symfony -V | grep -Ei 'version\s[0-9][.0-9]+' all: - pre: SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" - command: curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony - post: chmod +x /usr/local/bin/symfony + pre: VERSION="$(curl -s https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest | awk -F\" '/symfony-cli_.*._amd64\.deb/{print $(NF-1)}' | head -1 | sed 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')" + command: | + curl -sS -L --fail -o /tmp/symfonycli.deb https://github.com/symfony-cli/symfony-cli/releases/download/v${VERSION}/symfony-cli_${VERSION}_$(dpkg-architecture --query DEB_HOST_ARCH).deb \ + && dpkg -i /tmp/symfonycli.deb \ + && rm -f /tmp/symfonycli.deb \ wkhtmltopdf: check: if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi 5.2: