From dcbdd321ee5fdbc38f06253dae9bbba03063e718 Mon Sep 17 00:00:00 2001 From: Raphael Lopes Feitoza Date: Thu, 15 Aug 2024 16:30:57 -0400 Subject: [PATCH] Add support to ubuntu 24.04 --- .docker/Dockerfile-ubuntu_24.04 | 8 ++++++++ bin/wkhtmltopdf | 3 ++- test/test_with_docker.rb | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .docker/Dockerfile-ubuntu_24.04 diff --git a/.docker/Dockerfile-ubuntu_24.04 b/.docker/Dockerfile-ubuntu_24.04 new file mode 100644 index 0000000..49fa3fc --- /dev/null +++ b/.docker/Dockerfile-ubuntu_24.04 @@ -0,0 +1,8 @@ +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update +RUN apt-get install -y ruby libjpeg8 libxrender1 libfontconfig1 + +CMD /root/wkhtmltopdf_binary_gem/bin/wkhtmltopdf --version diff --git a/bin/wkhtmltopdf b/bin/wkhtmltopdf index 66ed804..c311e8c 100755 --- a/bin/wkhtmltopdf +++ b/bin/wkhtmltopdf @@ -38,11 +38,12 @@ suffix = case RbConfig::CONFIG['host_os'] os = 'ubuntu_20.04' if os.start_with?('ubuntu_20.') || os.start_with?('linuxmint_20.') - + os = 'ubuntu_21.10' if os.start_with?('ubuntu_21.') || os.start_with?('linuxmint_21.') os = 'ubuntu_22.04' if os.start_with?('ubuntu_22.') || + os.start_with?('ubuntu_24.') || os.start_with?('tuxedo_22.') os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2') || diff --git a/test/test_with_docker.rb b/test/test_with_docker.rb index c974502..450a778 100644 --- a/test/test_with_docker.rb +++ b/test/test_with_docker.rb @@ -57,6 +57,10 @@ def test_with_ubuntu_22 test_on_x86 with: 'ubuntu_22.04' end + def test_with_ubuntu_24 + test_on_x86 with: 'ubuntu_24.04' + end + def test_with_archlinux test_on_x86 with: 'archlinux' end