Skip to content
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: 5 additions & 1 deletion src/usr/local/containerbase/tools/v2/rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function init_tool () {
}

function check_tool_requirements () {
if [[ "${TOOL_VERSION}" == "nightly" || "${TOOL_VERSION}" == "beta" ]]; then
if [[ "${TOOL_VERSION}" == "beta" || "${TOOL_VERSION}" == "nightly" || "${TOOL_VERSION}" == nightly-* ]]; then
# allow beta and nightly versions
return
fi
Expand All @@ -43,6 +43,10 @@ function install_tool () {
local file_name

file_name="rust-${TOOL_VERSION}-${arch}-unknown-linux-gnu.tar"
if [[ "${TOOL_VERSION}" == nightly-* ]]; then
NIGHTLY_DATE="${TOOL_VERSION#nightly-}"
file_name="${NIGHTLY_DATE}/rust-nightly-${arch}-unknown-linux-gnu.tar"
fi
base_url="https://static.rust-lang.org/dist/${file_name}"

# not all releases have checksums
Expand Down
14 changes: 14 additions & 0 deletions test/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ SHELL [ "/bin/sh", "-c" ]
RUN rustc --version
RUN cargo --version

#--------------------------------------
# test e: nightly with date
#--------------------------------------
FROM base AS teste

USER 12021

RUN install-tool rust nightly-2026-06-19
Comment thread
jamietanna marked this conversation as resolved.

SHELL [ "/bin/sh", "-c" ]
RUN rustc --version
RUN cargo --version

#--------------------------------------
# final
#--------------------------------------
Expand All @@ -125,3 +138,4 @@ COPY --from=testa /.dummy /.dummy
COPY --from=testb /.dummy /.dummy
COPY --from=testc /.dummy /.dummy
COPY --from=testd /.dummy /.dummy
COPY --from=teste /.dummy /.dummy