1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-20 22:46:10 +02:00
nfpm/testdata/acceptance/rpm.env-var-version.dockerfile

14 lines
590 B
Plaintext
Raw Normal View History

FROM fedora
ARG package
COPY ${package} /tmp/foo.rpm
ENV EXPECTVER="Version : 1.0.0~0.1.b1+git.abcdefgh" \
EXPECTREL="Release : 1"
RUN rpm -qpi /tmp/foo.rpm | sed -e 's/ \+/ /g' | grep "Version" > found.ver
RUN rpm -qpi /tmp/foo.rpm | sed -e 's/ \+/ /g' | grep "Release" > found.rel
RUN export FOUND_VER="$(cat found.ver)" && \
echo "Expected: ${EXPECTVER}' :: Found: '${FOUND_VER}'" && \
test "${FOUND_VER}" = "${EXPECTVER}"
RUN export FOUND_REL="$(cat found.rel)" && \
echo "Expected: '${EXPECTREL}' :: Found: '${FOUND_REL}'" && \
test "${FOUND_REL}" = "${EXPECTREL}"