Skip to content

Commit

Permalink
fix(just, containerfile): properly get build files
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz committed Dec 9, 2024
1 parent a1a9601 commit f568769
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ COPY . /app
RUN dnf update -y && dnf upgrade -y && dnf install rpkg spectool -y && dnf clean all

WORKDIR /app
RUN rpkg --path $(dirname $TARGET_SPEC) spec --outdir /tmp --spec $(basename $TARGET_SPEC)
RUN cp -rf $(dirname $TARGET_SPEC)/* /tmp && \
rpkg --path $(dirname $TARGET_SPEC) spec --outdir /tmp --spec $(basename $TARGET_SPEC)

WORKDIR /tmp
RUN export SPEC=$(basename $TARGET_SPEC) && \
dnf -y builddep $SPEC && \
spectool -ag $SPEC -C /tmp && \
rpkg local --spec $SPEC
rpkg local --spec $SPEC --outdir /tmp && \
find /tmp

FROM scratch AS artifacts

COPY --from=builder /tmp/rpkg/*/*/*.rpm /
COPY --from=builder /tmp/*/*.rpm /
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extract package="staging/devpod/devpod.spec" extract_rpm="0":
PKGNAME={{package}}
PKGNAME="${PKGNAME##*/}"
PKGNAME="${PKGNAME%.*}"
rm -rf output
mkdir -p output
podman export $(podman create localhost/${PKGNAME}:latest) | tar xf - -C output
if [ {{extract_rpm}} -ne 1 ] ; then
Expand Down

0 comments on commit f568769

Please sign in to comment.