Skip to content

feat: add build-all target for pgrx #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ pgrx-init:
{{cargo}} pgrx init --{{pgrx_pg_version}}=download
fi

# Initialize all pgrx versions
[group('setup')]
pgrx-init-all:
#!/usr/bin/env -S {{shell}} -euo pipefail
{{cargo}} pgrx init

# Perform all required setup for the project
[group('setup')]
setup:
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/base-pkg-alpine3.18-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ COPY . .

# Initialize pgrx
ENV PGRX_IGNORE_RUST_VERSIONS=y
RUN just pgrx-init
RUN just pgrx-init-all

# Build the package
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" just build package
2 changes: 1 addition & 1 deletion infra/docker/base-pkg-alpine3.20.3-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ COPY . .

# Initialize pgrx
ENV PGRX_IGNORE_RUST_VERSIONS=y
RUN just pgrx-init
RUN just pgrx-init-all

# Build the package
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" just build package
2 changes: 1 addition & 1 deletion infra/docker/base-pkg-alpine3.21.3-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ COPY . .

# Initialize pgrx
ENV PGRX_IGNORE_RUST_VERSIONS=y
RUN just pgrx-init
RUN just pgrx-init-all

# Build the package
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" just build package
4 changes: 2 additions & 2 deletions infra/docker/pg_idkit-pg17.4-alpine3.21.3-amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV USER=$USER
ARG PGRX_PG_VERSION=pg17
ENV PGRX_PG_VERSION=$PGRX_PG_VERSION

ARG PKG_PG_VERSION=17.0
ARG PKG_PG_VERSION=17.4
ENV PKG_PG_VERSION=$PKG_PG_VERSION

ARG CARGO_FEATURES=pg17
Expand All @@ -23,7 +23,7 @@ WORKDIR /pg_idkit
COPY . .
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" just build package

FROM postgres:17.0-alpine3.21@sha256:7062a2109c4b51f3c792c7ea01e83ed12ef9a980886e3b3d380a7d2e5f6ce3f5
FROM postgres:17.4-alpine3.21@sha256:7062a2109c4b51f3c792c7ea01e83ed12ef9a980886e3b3d380a7d2e5f6ce3f5

ARG PGRX_PG_VERSION=pg17
ENV PGRX_PG_VERSION=$PGRX_PG_VERSION
Expand Down