Rollup merge of #40225 - shepmaster:restore-build-date-file, r=alexcrichton
Restore creating the channel-rust-$channel-date.txt files
I have **not** run this (because I don't know how to 😇), but it *does* compile.
r? @alexcrichton
This commit is contained in:
commit
37265d8b78
|
@ -185,15 +185,19 @@ impl Builder {
|
|||
let mut manifest = BTreeMap::new();
|
||||
manifest.insert("manifest-version".to_string(),
|
||||
toml::Value::String(manifest_version));
|
||||
manifest.insert("date".to_string(), toml::Value::String(date));
|
||||
manifest.insert("date".to_string(), toml::Value::String(date.clone()));
|
||||
manifest.insert("pkg".to_string(), toml::encode(&pkg));
|
||||
let manifest = toml::Value::Table(manifest).to_string();
|
||||
|
||||
let filename = format!("channel-rust-{}.toml", self.rust_release);
|
||||
self.write_manifest(&manifest, &filename);
|
||||
|
||||
let filename = format!("channel-rust-{}-date.txt", self.rust_release);
|
||||
self.write_date_stamp(&date, &filename);
|
||||
|
||||
if self.rust_release != "beta" && self.rust_release != "nightly" {
|
||||
self.write_manifest(&manifest, "channel-rust-stable.toml");
|
||||
self.write_date_stamp(&date, "channel-rust-stable-date.txt");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +224,7 @@ impl Builder {
|
|||
self.package("rust-docs", &mut manifest.pkg, TARGETS);
|
||||
self.package("rust-src", &mut manifest.pkg, &["*"]);
|
||||
|
||||
if self.channel == "nightly" {
|
||||
if self.rust_release == "nightly" {
|
||||
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
|
||||
}
|
||||
|
||||
|
@ -273,7 +277,7 @@ impl Builder {
|
|||
target: target.to_string(),
|
||||
});
|
||||
}
|
||||
if self.channel == "nightly" {
|
||||
if self.rust_release == "nightly" {
|
||||
extensions.push(Component {
|
||||
pkg: "rust-analysis".to_string(),
|
||||
target: target.to_string(),
|
||||
|
@ -413,4 +417,11 @@ impl Builder {
|
|||
self.hash(&dst);
|
||||
self.sign(&dst);
|
||||
}
|
||||
|
||||
fn write_date_stamp(&self, date: &str, name: &str) {
|
||||
let dst = self.output.join(name);
|
||||
t!(t!(File::create(&dst)).write_all(date.as_bytes()));
|
||||
self.hash(&dst);
|
||||
self.sign(&dst);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue