File tree Expand file tree Collapse file tree 1 file changed +32
-9
lines changed Expand file tree Collapse file tree 1 file changed +32
-9
lines changed Original file line number Diff line number Diff line change @@ -1318,22 +1318,45 @@ impl Xtasks {
1318
1318
None ,
1319
1319
) ?;
1320
1320
1321
- // install llvm-tools and clippy
1321
+ // install nightly toolchaing for bevy api gen
1322
+ let toolchain = Self :: read_rust_toolchain ( & Self :: codegen_crate_dir ( & app_settings) ?) ;
1323
+ Self :: run_system_command (
1324
+ & app_settings,
1325
+ "rustup" ,
1326
+ "Failed to install nightly toolchain" ,
1327
+ vec ! [ "toolchain" , "install" , toolchain. as_str( ) ] ,
1328
+ None ,
1329
+ ) ?;
1330
+
1331
+ let rustup_components_args = [
1332
+ "component" ,
1333
+ "add" ,
1334
+ "rust-src" ,
1335
+ "rustc-dev" ,
1336
+ "clippy" ,
1337
+ "llvm-tools-preview" ,
1338
+ ] ;
1339
+
1340
+ // install components for the stable and nightly toolchains
1322
1341
Self :: run_system_command (
1323
1342
& app_settings,
1324
1343
"rustup" ,
1325
1344
"Failed to install rust components" ,
1326
- vec ! [
1327
- "component" ,
1328
- "add" ,
1329
- "rust-src" ,
1330
- "rustc-dev" ,
1331
- "clippy" ,
1332
- "llvm-tools-preview" ,
1333
- ] ,
1345
+ rustup_components_args,
1334
1346
None ,
1335
1347
) ?;
1336
1348
1349
+ // add components on nightly toolchain
1350
+ Self :: run_system_command (
1351
+ & app_settings,
1352
+ "rustup" ,
1353
+ "Failed to install nightly components" ,
1354
+ rustup_components_args
1355
+ . iter ( )
1356
+ . chain ( [ "--toolchain" , toolchain. as_str ( ) ] . iter ( ) ) ,
1357
+ Some ( Path :: new ( "." ) ) ,
1358
+ ) ?;
1359
+
1337
1360
Ok ( ( ) )
1338
1361
}
1339
1362
}
You can’t perform that action at this time.
0 commit comments