@@ -183,15 +183,19 @@ impl Builder {
183
183
let mut manifest = BTreeMap :: new ( ) ;
184
184
manifest. insert ( "manifest-version" . to_string ( ) ,
185
185
toml:: Value :: String ( manifest_version) ) ;
186
- manifest. insert ( "date" . to_string ( ) , toml:: Value :: String ( date) ) ;
186
+ manifest. insert ( "date" . to_string ( ) , toml:: Value :: String ( date. clone ( ) ) ) ;
187
187
manifest. insert ( "pkg" . to_string ( ) , toml:: encode ( & pkg) ) ;
188
188
let manifest = toml:: Value :: Table ( manifest) . to_string ( ) ;
189
189
190
190
let filename = format ! ( "channel-rust-{}.toml" , self . rust_release) ;
191
191
self . write_manifest ( & manifest, & filename) ;
192
192
193
+ let filename = format ! ( "channel-rust-{}-date.txt" , self . rust_release) ;
194
+ self . write_date_stamp ( & date, & filename) ;
195
+
193
196
if self . rust_release != "beta" && self . rust_release != "nightly" {
194
197
self . write_manifest ( & manifest, "channel-rust-stable.toml" ) ;
198
+ self . write_date_stamp ( & date, "channel-rust-stable-date.txt" ) ;
195
199
}
196
200
}
197
201
@@ -411,4 +415,11 @@ impl Builder {
411
415
self . hash ( & dst) ;
412
416
self . sign ( & dst) ;
413
417
}
418
+
419
+ fn write_date_stamp ( & self , date : & str , name : & str ) {
420
+ let dst = self . output . join ( name) ;
421
+ t ! ( t!( File :: create( & dst) ) . write_all( date. as_bytes( ) ) ) ;
422
+ self . hash ( & dst) ;
423
+ self . sign ( & dst) ;
424
+ }
414
425
}
0 commit comments