Skip to content

Commit 9eb11b9

Browse files
dvlbotmartin-rueegg
authored andcommitted
Fix wkhtmltodf and wp-cli installation
1 parent b9775fd commit 9eb11b9

File tree

15 files changed

+52
-24
lines changed

15 files changed

+52
-24
lines changed

.ansible/group_vars/all/work.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ tools_available:
623623
command: |
624624
DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
625625
&& WK_URL="$( \
626-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
627-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
626+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
627+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
628628
| head -1 \
629629
)" \
630630
&& echo "URL: ${WK_URL}" \
@@ -677,7 +677,9 @@ tools_available:
677677
type: custom
678678
command: curl -sS -L --fail "${WPCLI_URL}" -L -o /usr/local/bin/wp
679679
build_dep: []
680-
run_dep: []
680+
# Fixes: sh: 1: less: not found during 'wp help'
681+
# It internally pipes it to less.
682+
run_dep: [less]
681683
pre: WPCLI_URL="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
682684
post: chmod +x /usr/local/bin/wp
683685
5.5:

Dockerfiles/work/Dockerfile-5.3

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ RUN set -eux \
270270
# ---------- run_deps ----------
271271
dos2unix \
272272
file \
273+
less \
273274
moreutils \
274275
ruby \
275276
# ---------- type: apt ----------
@@ -581,6 +582,7 @@ RUN set -eux \
581582
# ---------- run_deps ----------
582583
dos2unix \
583584
file \
585+
less \
584586
moreutils \
585587
ruby \
586588
# ---------- type: apt ----------

Dockerfiles/work/Dockerfile-5.4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ RUN set -eux \
270270
# ---------- run_deps ----------
271271
dos2unix \
272272
file \
273+
less \
273274
moreutils \
274275
ruby \
275276
# ---------- type: apt ----------
@@ -604,6 +605,7 @@ RUN set -eux \
604605
# ---------- run_deps ----------
605606
dos2unix \
606607
file \
608+
less \
607609
moreutils \
608610
ruby \
609611
# ---------- type: apt ----------

Dockerfiles/work/Dockerfile-5.5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ RUN set -eux \
270270
# ---------- run_deps ----------
271271
dos2unix \
272272
file \
273+
less \
273274
moreutils \
274275
ruby \
275276
# ---------- type: apt ----------
@@ -659,6 +660,7 @@ RUN set -eux \
659660
# ---------- run_deps ----------
660661
dos2unix \
661662
file \
663+
less \
662664
moreutils \
663665
ruby \
664666
# ---------- type: apt ----------

Dockerfiles/work/Dockerfile-5.6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ RUN set -eux \
271271
dos2unix \
272272
file \
273273
fontconfig \
274+
less \
274275
libfontenc1 \
275276
libxfont1 \
276277
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="stretch" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont1 \
690692
libxrender1 \

Dockerfiles/work/Dockerfile-7.0

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ RUN set -eux \
271271
dos2unix \
272272
file \
273273
fontconfig \
274+
less \
274275
libfontenc1 \
275276
libxfont1 \
276277
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="stretch" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont1 \
690692
libxrender1 \

Dockerfiles/work/Dockerfile-7.1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ RUN set -eux \
271271
dos2unix \
272272
file \
273273
fontconfig \
274+
less \
274275
libfontenc1 \
275276
libxfont2 \
276277
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="buster" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont2 \
690692
libxrender1 \

Dockerfiles/work/Dockerfile-7.2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ RUN set -eux \
271271
dos2unix \
272272
file \
273273
fontconfig \
274+
less \
274275
libfontenc1 \
275276
libxfont2 \
276277
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="buster" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont2 \
690692
libxrender1 \

Dockerfiles/work/Dockerfile-7.3

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ RUN set -eux \
273273
dos2unix \
274274
file \
275275
fontconfig \
276+
less \
276277
libfontenc1 \
277278
libxfont2 \
278279
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="bullseye" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont2 \
690692
libxrender1 \

Dockerfiles/work/Dockerfile-7.4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ RUN set -eux \
273273
dos2unix \
274274
file \
275275
fontconfig \
276+
less \
276277
libfontenc1 \
277278
libxfont2 \
278279
libxrender1 \
@@ -615,8 +616,8 @@ RUN set -eux \
615616
&& OS_RELEASE="bullseye" \
616617
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
617618
&& WK_URL="$( \
618-
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
619-
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
619+
curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \
620+
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
620621
| head -1 \
621622
)" \
622623
&& echo "URL: ${WK_URL}" \
@@ -685,6 +686,7 @@ RUN set -eux \
685686
dos2unix \
686687
file \
687688
fontconfig \
689+
less \
688690
libfontenc1 \
689691
libxfont2 \
690692
libxrender1 \

0 commit comments

Comments
 (0)