forked from vhaudiquet/rhema-together
build: depend on the Rhema crates by version
The manifest pointed at `../rhema`, so a build needed that checkout beside the repository. CI cloned it in two jobs and the Dockerfile cloned a tag and rewrote the paths. The committed lock had drifted to 0.5.1 entries after the framework bumped to 0.5.2, so the first cargo command in a clean tree rewrote it. All twelve crates are on crates.io at 0.5.2, so the manifest names that version and the lock pins it. The clone steps, the `RHEMA_REF` argument, and the path rewrite are gone from the workflows and the image. Moving the framework now means `cargo update` on the `rhema-*` packages.
This commit is contained in:
1 parent
89aca58364
commit
b5babb682e
8 files changed
+103
-69
No files matched your search
+3
-7
@@ -9,18 +9,14 @@ RUN pnpm install --frozen-lockfile
|
||||
COPY web/ ./
|
||||
RUN pnpm build
|
||||
|
||||
# The server consumes the Rhema crates. The clone is pinned so an image
|
||||
# does not move when the framework's main branch does.
|
||||
# The server depends on the Rhema crates by version. Cargo.lock pins
|
||||
# them, so an image does not move when the framework's main branch does.
|
||||
FROM rust:1.98.1-bookworm AS server
|
||||
ARG RHEMA_REPOSITORY=https://github.com/vhaudiquet/rhema.git
|
||||
ARG RHEMA_REF=v0.5.1
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates cmake git pkg-config \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates cmake pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN git clone --depth 1 --branch "${RHEMA_REF}" "${RHEMA_REPOSITORY}" /rhema
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN sed -i 's#path = "../rhema/#path = "/rhema/#g' Cargo.toml
|
||||
COPY src ./src
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
Reference in new issue
Block a user