@@ -180,15 +180,19 @@ impl Builder {
180
180
let mut manifest = BTreeMap :: new ( ) ;
181
181
manifest. insert ( "manifest-version" . to_string ( ) ,
182
182
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 ( ) ) ) ;
184
184
manifest. insert ( "pkg" . to_string ( ) , toml:: encode ( & pkg) ) ;
185
185
let manifest = toml:: Value :: Table ( manifest) . to_string ( ) ;
186
186
187
187
let filename = format ! ( "channel-rust-{}.toml" , self . channel) ;
188
188
self . write_manifest ( & manifest, & filename) ;
189
189
190
+ let filename = format ! ( "channel-rust-{}-date.txt" , self . channel) ;
191
+ self . write_date_stamp ( & date, & filename) ;
192
+
190
193
if self . channel != "beta" && self . channel != "nightly" {
191
194
self . write_manifest ( & manifest, "channel-rust-stable.toml" ) ;
195
+ self . write_date_stamp ( & date, "channel-rust-stable-date.txt" ) ;
192
196
}
193
197
}
194
198
@@ -408,4 +412,11 @@ impl Builder {
408
412
self . hash ( & dst) ;
409
413
self . sign ( & dst) ;
410
414
}
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
+ }
411
422
}
0 commit comments