From 1e1cb7c57c8419db61407816dc5788cf97cce7a2 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 18 Jul 2019 21:19:07 -0700 Subject: [PATCH] Select stable rust version (#5180) --- ci/publish-crate.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/publish-crate.sh b/ci/publish-crate.sh index fd354a0bf..19a2652ba 100755 --- a/ci/publish-crate.sh +++ b/ci/publish-crate.sh @@ -2,6 +2,7 @@ set -e cd "$(dirname "$0")/.." source ci/semver_bash/semver.sh +source ci/rust-version.sh stable # shellcheck disable=SC2086 is_crate_version_uploaded() { @@ -25,8 +26,6 @@ expectedCrateVersion="$MAJOR.$MINOR.$PATCH$SPECIAL" exit 1 } -cargoCommand="cargo publish --token $CRATES_IO_TOKEN" - Cargo_tomls=$(ci/order-crates-for-publishing.py) for Cargo_toml in $Cargo_tomls; do @@ -53,7 +52,7 @@ for Cargo_toml in $Cargo_tomls; do crate=$(dirname "$Cargo_toml") # TODO: the rocksdb package does not build with the stock rust docker image, # so use the solana rust docker image until this is resolved upstream - source ci/rust-version.sh + cargoCommand="cargo publish --token $CRATES_IO_TOKEN" ci/docker-run.sh "$rust_stable_docker_image" bash -exc "cd $crate; $cargoCommand" ) || true # <-- Don't fail. We want to be able to retry the job in cases when a publish fails halfway due to network/cloud issues @@ -67,11 +66,11 @@ for Cargo_toml in $Cargo_tomls; do ( set -x rm -rf crate-test - cargo init crate-test + cargo +"$rust_stable" init crate-test cd crate-test/ echo "${crate_name} = \"${expectedCrateVersion}\"" >> Cargo.toml echo "[workspace]" >> Cargo.toml - cargo check + cargo +"$rust_stable" check ) && really_uploaded=1 if ((really_uploaded)); then break;