Skip to content

Commit

Permalink
Explicitly forward version in local tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdno committed Jan 7, 2025
1 parent a3a0d89 commit 4696fb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ "${command}" == "release" ]]; then
fi

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

# If the PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION environment variable is set,
# forward it to the Docker environment.
if [[ "$PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION" != "" ]]; then
docker compose exec -T local "PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION=${PROMOTE_RELEASE_RUSTUP_OVERRIDE_VERSION} /src/local/${command}.sh" "${channel}" "${override_commit}"
fi

# Run the command inside the docker environment.
docker compose exec -T local "/src/local/${command}.sh" "${channel}" "${override_commit}"

0 comments on commit 4696fb1

Please sign in to comment.