]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Chore: use variables for zxing and psycopg version number (#9006)
authorBenoit Anastay <benoit@anastay.dev>
Fri, 7 Feb 2025 17:52:08 +0000 (18:52 +0100)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2025 17:52:08 +0000 (09:52 -0800)
* Use variables for zxing and psycopg

Code consistency

* Tweaks the downloaded files and moves the location of the ARG for better cache hits

---------

Co-authored-by: Trenton Holmes <797416+stumpylog@users.noreply.github.com>
Dockerfile

index 2284e9f8da73a081cb498a9e9036b6f4315c1dff..3eab1dc2f4f078ee30626361e21015a1785fa471 100644 (file)
@@ -213,6 +213,9 @@ ARG BUILD_PACKAGES="\
   default-libmysqlclient-dev \
   pkg-config"
 
+ARG ZXING_VERSION=2.3.0
+ARG PSYCOPG_VERSION=3.2.4
+
 # hadolint ignore=DL3042
 RUN --mount=type=cache,target=/root/.cache/pip/,id=pip-cache \
   set -eux \
@@ -222,10 +225,10 @@ RUN --mount=type=cache,target=/root/.cache/pip/,id=pip-cache \
     && python3 -m pip install --no-cache-dir --upgrade wheel \
   && echo "Installing Python requirements" \
     && curl --fail --silent --no-progress-meter --show-error --location --remote-name-all --parallel --parallel-max 4 \
-      https://github.com/paperless-ngx/builder/releases/download/psycopg-3.2.4/psycopg_c-3.2.4-cp312-cp312-linux_x86_64.whl \
-      https://github.com/paperless-ngx/builder/releases/download/psycopg-3.2.4/psycopg_c-3.2.4-cp312-cp312-linux_aarch64.whl \
-      https://github.com/paperless-ngx/builder/releases/download/zxing-2.3.0/zxing_cpp-2.3.0-cp312-cp312-linux_aarch64.whl \
-      https://github.com/paperless-ngx/builder/releases/download/zxing-2.3.0/zxing_cpp-2.3.0-cp312-cp312-linux_x86_64.whl \
+      https://github.com/paperless-ngx/builder/releases/download/psycopg-${PSYCOPG_VERSION}/psycopg_c-${PSYCOPG_VERSION}-cp312-cp312-linux_x86_64.whl \
+      https://github.com/paperless-ngx/builder/releases/download/psycopg-${PSYCOPG_VERSION}/psycopg_c-${PSYCOPG_VERSION}-cp312-cp312-linux_aarch64.whl \
+      https://github.com/paperless-ngx/builder/releases/download/zxing-${ZXING_VERSION}/zxing_cpp-${ZXING_VERSION}-cp312-cp312-linux_aarch64.whl \
+      https://github.com/paperless-ngx/builder/releases/download/zxing-${ZXING_VERSION}/zxing_cpp-${ZXING_VERSION}-cp312-cp312-linux_x86_64.whl \
     && python3 -m pip install --default-timeout=1000 --find-links . --requirement requirements.txt \
   && echo "Installing NLTK data" \
     && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" snowball_data \