Ensure CLI versions are set correctly for RPM packages

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-08-23 21:15:41 +02:00
parent 8daa257b35
commit c5b0278c58
2 changed files with 10 additions and 10 deletions

View File

@ -28,9 +28,9 @@ ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ARG PKG_NAME ARG PKG_NAME
ARG PKG_VERS ARG PKG_VERS
ARG PKG_REV ARG PKG_REV
ENV PKG_NAME ${PKG_NAME}
ENV VERSION $PKG_VERS ENV PKG_VERS ${PKG_VERS}
ENV RELEASE $PKG_REV ENV PKG_REV ${PKG_REV}
# output directory # output directory
ENV DIST_DIR=/tmp/nvidia-container-toolkit-$PKG_VERS/SOURCES ENV DIST_DIR=/tmp/nvidia-container-toolkit-$PKG_VERS/SOURCES
@ -65,8 +65,8 @@ CMD arch=$(uname -m) && \
-D "_topdir $PWD" \ -D "_topdir $PWD" \
-D "release_date $(date +'%a %b %d %Y')" \ -D "release_date $(date +'%a %b %d %Y')" \
-D "git_commit ${GIT_COMMIT}" \ -D "git_commit ${GIT_COMMIT}" \
-D "version $VERSION" \ -D "version ${PKG_VERS}" \
-D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \ -D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \
-D "release $RELEASE" \ -D "release ${PKG_REV}" \
SPECS/nvidia-container-toolkit.spec && \ SPECS/nvidia-container-toolkit.spec && \
mv RPMS/$arch/*.rpm /dist mv RPMS/$arch/*.rpm /dist

View File

@ -46,9 +46,9 @@ ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ARG PKG_NAME ARG PKG_NAME
ARG PKG_VERS ARG PKG_VERS
ARG PKG_REV ARG PKG_REV
ENV PKG_NAME ${PKG_NAME}
ENV VERSION $PKG_VERS ENV PKG_VERS ${PKG_VERS}
ENV RELEASE $PKG_REV ENV PKG_REV ${PKG_REV}
# output directory # output directory
ENV DIST_DIR=/tmp/nvidia-container-toolkit-$PKG_VERS/SOURCES ENV DIST_DIR=/tmp/nvidia-container-toolkit-$PKG_VERS/SOURCES
@ -83,8 +83,8 @@ CMD arch=$(uname -m) && \
-D "_topdir $PWD" \ -D "_topdir $PWD" \
-D "release_date $(date +'%a %b %d %Y')" \ -D "release_date $(date +'%a %b %d %Y')" \
-D "git_commit ${GIT_COMMIT}" \ -D "git_commit ${GIT_COMMIT}" \
-D "version $VERSION" \ -D "version ${PKG_VERS}" \
-D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \ -D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \
-D "release $RELEASE" \ -D "release ${PKG_REV}" \
SPECS/nvidia-container-toolkit.spec && \ SPECS/nvidia-container-toolkit.spec && \
mv RPMS/$arch/*.rpm /dist mv RPMS/$arch/*.rpm /dist