File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -290,14 +290,26 @@ fn create_package(
290290 ) ;
291291
292292 // Custom hardcoded resources
293- for file in & [ "logo.png" , "about.md" , "changelog.md" , "support.md" ] {
293+ for file in [ "logo.png" , "about.md" , "changelog.md" , "support.md" ] {
294294 let path = root_path. join ( file) ;
295295 if path. exists ( ) {
296296 std:: fs:: copy ( path, working_dir. join ( file) )
297297 . nice_unwrap ( format ! ( "Could not copy {file}" ) ) ;
298298 }
299299 }
300300
301+ // Use readme as about.md if its missing
302+ if !root_path. join ( "about.md" ) . exists ( ) {
303+ for file in [ "README.md" , "readme.md" , "Readme.md" ] {
304+ let path = root_path. join ( file) ;
305+ if path. exists ( ) {
306+ std:: fs:: copy ( path, working_dir. join ( "about.md" ) )
307+ . nice_unwrap ( format ! ( "Could not copy {file}" ) ) ;
308+ break ;
309+ }
310+ }
311+ }
312+
301313 // Copy headers
302314 if let Some ( ref api) = mod_file_info. api {
303315 for header in & api. include {
You can’t perform that action at this time.
0 commit comments