From d898fceb2828a1b6e4ddade01c0466c259b524a4 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Thu, 9 Jan 2025 13:30:29 -0500 Subject: [PATCH] Build count_distinct from PGXN releases --- contrib/count_distinct/Dockerfile | 13 ++++++------- contrib/count_distinct/Trunk.toml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/contrib/count_distinct/Dockerfile b/contrib/count_distinct/Dockerfile index 50b572c0..ce0fe737 100644 --- a/contrib/count_distinct/Dockerfile +++ b/contrib/count_distinct/Dockerfile @@ -2,11 +2,10 @@ ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone and build the extension. +# Download and build extension ARG EXTENSION_NAME -# ARG EXTENSION_VERSION -ARG RELEASE=8f4883a -RUN git clone https://github.com/tvondra/${EXTENSION_NAME}.git \ - && cd ${EXTENSION_NAME} \ - && git checkout ${RELEASE} \ - && make +ARG EXTENSION_VERSION +RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make +WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION} diff --git a/contrib/count_distinct/Trunk.toml b/contrib/count_distinct/Trunk.toml index a4443d4a..0b051343 100644 --- a/contrib/count_distinct/Trunk.toml +++ b/contrib/count_distinct/Trunk.toml @@ -14,4 +14,4 @@ apt = ["libc6"] postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = "make -C count_distinct install" +install_command = "make install"