Skip to content

Commit 4f930fc

Browse files
authored
Rollup merge of rust-lang#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
2 parents 478b8e2 + b601b75 commit 4f930fc

File tree

1 file changed

+12
-1
lines changed
  • src/tools/build-manifest/src

1 file changed

+12
-1
lines changed

src/tools/build-manifest/src/main.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,19 @@ impl Builder {
180180
let mut manifest = BTreeMap::new();
181181
manifest.insert("manifest-version".to_string(),
182182
toml::Value::String(manifest_version));
183-
manifest.insert("date".to_string(), toml::Value::String(date));
183+
manifest.insert("date".to_string(), toml::Value::String(date.clone()));
184184
manifest.insert("pkg".to_string(), toml::encode(&pkg));
185185
let manifest = toml::Value::Table(manifest).to_string();
186186

187187
let filename = format!("channel-rust-{}.toml", self.channel);
188188
self.write_manifest(&manifest, &filename);
189189

190+
let filename = format!("channel-rust-{}-date.txt", self.channel);
191+
self.write_date_stamp(&date, &filename);
192+
190193
if self.channel != "beta" && self.channel != "nightly" {
191194
self.write_manifest(&manifest, "channel-rust-stable.toml");
195+
self.write_date_stamp(&date, "channel-rust-stable-date.txt");
192196
}
193197
}
194198

@@ -408,4 +412,11 @@ impl Builder {
408412
self.hash(&dst);
409413
self.sign(&dst);
410414
}
415+
416+
fn write_date_stamp(&self, date: &str, name: &str) {
417+
let dst = self.output.join(name);
418+
t!(t!(File::create(&dst)).write_all(date.as_bytes()));
419+
self.hash(&dst);
420+
self.sign(&dst);
421+
}
411422
}

0 commit comments

Comments
 (0)