Auto merge of #150381 - JonathanBrouwer:rollup-c7pqytw, r=JonathanBrouwer
Rollup of 2 pull requests Successful merges: - rust-lang/rust#149964 (Write file with channel to S3) - rust-lang/rust#150365 (refactor: simplify code) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
fabece9e94
3 changed files with 24 additions and 13 deletions
|
|
@ -117,7 +117,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
|
|||
candidate = Some(*delimiter_span);
|
||||
}
|
||||
}
|
||||
let (_, _) = self.diag_info.open_delimiters.pop().unwrap();
|
||||
self.diag_info.open_delimiters.pop().unwrap();
|
||||
self.diag_info.unmatched_delims.push(UnmatchedDelim {
|
||||
found_delim: Some(close_delim),
|
||||
found_span: self.token.span,
|
||||
|
|
|
|||
|
|
@ -1624,26 +1624,20 @@ impl Build {
|
|||
self.release(&self.version)
|
||||
}
|
||||
|
||||
/// Returns the "package version" for a component given the `num` release
|
||||
/// number.
|
||||
/// Returns the "package version" for a component.
|
||||
///
|
||||
/// The package version is typically what shows up in the names of tarballs.
|
||||
/// For channels like beta/nightly it's just the channel name, otherwise
|
||||
/// it's the `num` provided.
|
||||
fn package_vers(&self, num: &str) -> String {
|
||||
/// For channels like beta/nightly it's just the channel name, otherwise it's the release
|
||||
/// version.
|
||||
fn rust_package_vers(&self) -> String {
|
||||
match &self.config.channel[..] {
|
||||
"stable" => num.to_string(),
|
||||
"stable" => self.version.to_string(),
|
||||
"beta" => "beta".to_string(),
|
||||
"nightly" => "nightly".to_string(),
|
||||
_ => format!("{num}-dev"),
|
||||
_ => format!("{}-dev", self.version),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the value of `package_vers` above for Rust itself.
|
||||
fn rust_package_vers(&self) -> String {
|
||||
self.package_vers(&self.version)
|
||||
}
|
||||
|
||||
/// Returns the `version` string associated with this compiler for Rust
|
||||
/// itself.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
ci_dir=`cd $(dirname $0)/.. && pwd`
|
||||
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
|
||||
|
||||
upload_dir="$(mktemp -d)"
|
||||
|
|
@ -22,6 +23,22 @@ if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
|
|||
mv "${dist_dir}"/* "${upload_dir}"
|
||||
fi
|
||||
|
||||
# We write the release channel into the output so that
|
||||
# `rustup-toolchain-install-master` or other, similar, tools can automatically
|
||||
# detect the appropriate name to use for downloading artifacts.
|
||||
#
|
||||
# For nightly and beta this isn't strictly necessary as just trying both is
|
||||
# enough, but stable builds produce artifacts with a version (e.g.,
|
||||
# rust-src-1.92.0.tar.xz) which can't be easily guessed otherwise.
|
||||
channel=$(releaseChannel)
|
||||
if [[ "$channel" = "stable" ]]; then
|
||||
# On stable, artifacts use the version number. See rust_package_vers in
|
||||
# src/bootstrap/src/lib.rs.
|
||||
cat "$ci_dir/../version" > "${upload_dir}/package-version"
|
||||
else
|
||||
echo "$channel" > "${upload_dir}/package-version"
|
||||
fi
|
||||
|
||||
# CPU usage statistics.
|
||||
cp build/cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue