Skip to content

Commit

Permalink
Merge pull request #262 from devilbox/fix-tools
Browse files Browse the repository at this point in the history
Fix wkhtmltodf and wp-cli installation
  • Loading branch information
dvlbot authored Dec 15, 2022
2 parents a1f7c0c + 9c552b0 commit 06cb912
Show file tree
Hide file tree
Showing 17 changed files with 92 additions and 57 deletions.
10 changes: 6 additions & 4 deletions .ansible/group_vars/all/work.yml
Original file line number Diff line number Diff line change
Expand Up @@ -623,12 +623,12 @@ tools_available:
command: |
DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
run_dep:
Expand Down Expand Up @@ -677,7 +677,9 @@ tools_available:
type: custom
command: curl -sS -L --fail "${WPCLI_URL}" -L -o /usr/local/bin/wp
build_dep: []
run_dep: []
# Fixes: sh: 1: less: not found during 'wp help'
# It internally pipes it to less.
run_dep: [less]
pre: WPCLI_URL="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
post: chmod +x /usr/local/bin/wp
5.5:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
## Unreleased


## Release 0.147

### Fixed
- Fixed wkhtmltopdf version finder during install
- Fixed wp-cli runtime requirements (needs `less` in order to function)


## Release 0.146

This release adds lots of documentation about recently added features.
Expand Down
2 changes: 2 additions & 0 deletions Dockerfiles/work/Dockerfile-5.3
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down Expand Up @@ -581,6 +582,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down
2 changes: 2 additions & 0 deletions Dockerfiles/work/Dockerfile-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down Expand Up @@ -604,6 +605,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down
2 changes: 2 additions & 0 deletions Dockerfiles/work/Dockerfile-5.5
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down Expand Up @@ -659,6 +660,7 @@ RUN set -eux \
# ---------- run_deps ----------
dos2unix \
file \
less \
moreutils \
ruby \
# ---------- type: apt ----------
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont1 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="stretch" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont1 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont1 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="stretch" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont1 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="buster" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="buster" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="bullseye" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="bullseye" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-8.0
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="bullseye" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-8.1
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -615,12 +616,12 @@ RUN set -eux \
&& OS_RELEASE="bullseye" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -685,6 +686,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfiles/work/Dockerfile-8.2
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down Expand Up @@ -568,12 +569,12 @@ RUN set -eux \
&& OS_RELEASE="bullseye" \
&& DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \
&& WK_URL="$( \
curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \
| awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \
| awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \
| head -1 \
)" \
&& echo "URL: ${WK_URL}" \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
Expand Down Expand Up @@ -638,6 +639,7 @@ RUN set -eux \
dos2unix \
file \
fontconfig \
less \
libfontenc1 \
libxfont2 \
libxrender1 \
Expand Down
Loading

0 comments on commit 06cb912

Please sign in to comment.