Skip to content

Commit e01d9e9

Browse files
committed
Fix paths when downloading Rustup artifacts
1 parent 9f4f3ab commit e01d9e9

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

local/rustup.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -euo pipefail
88
IFS=$'\n\t'
99

1010
RUSTUP_REPO="https://github.com/rust-lang/rustup"
11-
RUSTUP_DEFAULT_BRANCH="master"
11+
RUSTUP_DEFAULT_BRANCH="stable"
1212

1313
# S3 bucket from which to download the Rustup artifacts
1414
S3_BUCKET="rustup-builds"
@@ -19,6 +19,7 @@ DOWNLOAD_BASE="https://rustup-builds.rust-lang.org"
1919
# The artifacts for the following targets will be downloaded and copied during
2020
# the release process. At least one target is required.
2121
DOWNLOAD_TARGETS=(
22+
"aarch64-unknown-linux-gnu"
2223
"x86_64-unknown-linux-gnu"
2324
)
2425

@@ -42,12 +43,14 @@ else
4243
fi
4344

4445
for target in "${DOWNLOAD_TARGETS[@]}"; do
45-
if ! mc stat "local/artifacts/builds/${commit}/dist/${target}" >/dev/null 2>&1; then
46+
if ! mc stat "local/rustup-builds/${commit}/dist/${target}" >/dev/null 2>&1; then
4647
echo "==> copying ${target} from S3"
4748

4849
for file in "${DOWNLOAD_FILES[@]}"; do
50+
echo "==> copying ${file} from S3"
51+
4952
if curl -Lo /tmp/component "${DOWNLOAD_BASE}/${commit}/dist/${target}/${file}" --fail; then
50-
mc cp /tmp/component "local/artifacts/builds/${commit}/dist/${target}/${file}" >/dev/null
53+
mc cp /tmp/component "local/rustup-builds/${commit}/dist/${target}/${file}" >/dev/null
5154
fi
5255
done
5356
else
@@ -78,7 +81,7 @@ export PROMOTE_RELEASE_CHANNEL="${channel}"
7881
export PROMOTE_RELEASE_CLOUDFRONT_DOC_ID=""
7982
export PROMOTE_RELEASE_CLOUDFRONT_STATIC_ID=""
8083
export PROMOTE_RELEASE_DOWNLOAD_BUCKET="rustup-builds"
81-
export PROMOTE_RELEASE_DOWNLOAD_DIR="builds"
84+
export PROMOTE_RELEASE_DOWNLOAD_DIR=""
8285
export PROMOTE_RELEASE_GPG_KEY_FILE=""
8386
export PROMOTE_RELEASE_GPG_PASSWORD_FILE=""
8487
export PROMOTE_RELEASE_UPLOAD_ADDR=""

src/rustup.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,24 @@ impl Context {
142142
}
143143

144144
fn download_rustup_artifacts(&mut self, sha: &str) -> Result<PathBuf, Error> {
145-
println!("Downloading artifacts from dev-static...");
145+
println!(
146+
"Downloading artifacts from {}...",
147+
self.config.download_bucket
148+
);
146149

147-
let dl = self.dl_dir().join("dist");
150+
let dl = self.dl_dir().join("rustup");
148151
// Remove the directory if it exists, otherwise just ignore.
149152
let _ = fs::remove_dir_all(&dl);
150153
fs::create_dir_all(&dl)?;
151154

152-
let download_path = format!("{}/{}", self.config.download_dir, sha);
155+
let artifacts_url = format!("s3://{}/{}", self.config.download_bucket, sha);
153156

154157
run(self
155158
.aws_s3()
156159
.arg("cp")
157160
.arg("--recursive")
158161
.arg("--only-show-errors")
159-
.arg(self.s3_artifacts_url(&download_path))
162+
.arg(artifacts_url)
160163
.arg(format!("{}/", dl.display())))?;
161164

162165
Ok(dl)

0 commit comments

Comments
 (0)