From 8af34d44e2e110864a0db906e0911bbb96dc9e35 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Thu, 10 Jul 2025 19:22:13 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20handles=20specific=20pgve?= =?UTF-8?q?cto.rs=20release=20for=20pg17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ac52f28..7f385de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,14 @@ RUN apt update && apt install -y curl wget # Extract PostgreSQL major version from CNPG_TAG (handles formats like "17.5-bookworm" -> "17") RUN PG_MAJOR=$(echo $CNPG_TAG | cut -d'-' -f1 | cut -d'.' -f1) && \ - curl -L -o ./pgvectors.deb "https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${PG_MAJOR}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb" && \ + VERSION_NUM=${PGVECTORS_TAG#"v"} && \ + if [ "$PG_MAJOR" = "17" ] && [ "$VERSION_NUM" = "0.3.0" ]; then \ + # Special case for PG17 with v0.3.0 - use vectors variant + curl -L -o ./pgvectors.deb "https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${PG_MAJOR}_${VERSION_NUM}_${TARGETARCH}_vectors.deb"; \ + else \ + # Standard naming for other versions + curl -L -o ./pgvectors.deb "https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${PG_MAJOR}_${VERSION_NUM}_$TARGETARCH.deb"; \ + fi && \ apt install -y ./pgvectors.deb && \ rm -f ./pgvectors.deb