Skip to content

Commit 8c07e30

Browse files
committed
refactor slightly
1 parent 0352751 commit 8c07e30

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ env:
1818
REGISTRY: ghcr.io
1919
IMAGE_NAME: bevy-mod-scripting
2020
CODEGEN_BRANCH_NAME: __update-bevy-bindings-${{ github.head_ref || github.ref_name }}
21-
21+
GH_TOKEN: ${{ github.token }}
22+
2223
concurrency:
2324
# Use github.run_id on main branch
2425
# Use github.event.pull_request.number on pull requests, so it's unique per pull request

crates/xtask/src/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,20 +835,24 @@ impl Xtasks {
835835
}
836836

837837
fn check_codegen_crate(app_settings: GlobalArgs, ide_mode: bool) -> Result<()> {
838+
let toolchain = Self::read_rust_toolchain(&Self::codegen_crate_dir(&app_settings)?);
839+
838840
// set the working directory to the codegen crate
839841
let app_settings = app_settings
840842
.clone()
841-
.with_workspace_dir(Self::codegen_crate_dir(&app_settings)?);
843+
.with_workspace_dir(Self::codegen_crate_dir(&app_settings)?)
844+
.with_toolchain(toolchain)
845+
.with_features(Features::new(vec![])); // TODO: support features for codegen crate if any
842846

843-
let mut clippy_args = vec!["+nightly-2024-12-15", "clippy"];
847+
let mut clippy_args = vec![];
844848
if ide_mode {
845849
clippy_args.push("--message-format=json");
846850
}
847851
clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]);
848852

849-
Self::run_system_command(
853+
Self::run_workspace_command(
850854
&app_settings,
851-
"cargo",
855+
"clippy",
852856
"Failed to run clippy on codegen crate",
853857
clippy_args,
854858
None,

0 commit comments

Comments
 (0)