Skip to content

Commit 4696fb1

Browse files
committed
Explicitly forward version in local tests
1 parent a3a0d89 commit 4696fb1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: run.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [[ "${command}" == "release" ]]; then
1919
fi
2020

2121
if [[ "${command}" == "rustup" ]]; then
22-
if [[ "$#" -ne 2 ]]; then
22+
if [[ "$#" -lt 2 ]] || [[ "$#" -gt 3 ]]; then
2323
echo "Usage: $0 rustup <stable|dev> [commit]"
2424
exit 1
2525
fi
@@ -48,5 +48,11 @@ if [[ "$(uname)" == "Linux" ]]; then
4848
cargo build --release
4949
fi
5050

51+
# If the PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION environment variable is set,
52+
# forward it to the Docker environment.
53+
if [[ "$PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION" != "" ]]; then
54+
docker compose exec -T local "PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION=${PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION} /src/local/${command}.sh" "${channel}" "${override_commit}"
55+
fi
56+
5157
# Run the command inside the docker environment.
5258
docker compose exec -T local "/src/local/${command}.sh" "${channel}" "${override_commit}"

0 commit comments

Comments
 (0)