Skip to content

Commit a59bc69

Browse files
ObserverOfTimeamaanq
authored andcommitted
feat(xtask): let upgrade-wasmtime update Cargo.lock
1 parent 1d5502d commit a59bc69

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

xtask/src/upgrade_wasmtime.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ fn update_cargo(version: &Version) -> Result<()> {
2323

2424
std::fs::write("lib/Cargo.toml", new_lines.join("\n") + "\n")?;
2525

26-
Ok(())
26+
Command::new("cargo")
27+
.arg("update")
28+
.status()
29+
.map(|_| ())
30+
.with_context(|| "Failed to execute cargo update")
2731
}
2832

2933
fn zig_fetch(lines: &mut Vec<String>, version: &Version, url_suffix: &str) -> Result<()> {
@@ -119,7 +123,7 @@ fn create_commit(repo: &Repository, version: &Version) -> Result<()> {
119123
Some("HEAD"),
120124
&signature,
121125
&signature,
122-
&format!("build(deps): bump wasmtime to v{version}"),
126+
&format!("build(deps): bump wasmtime-c-api to v{version}"),
123127
&tree,
124128
&[&parent_commit],
125129
)?;
@@ -128,10 +132,10 @@ fn create_commit(repo: &Repository, version: &Version) -> Result<()> {
128132
}
129133

130134
pub fn run(args: &UpgradeWasmtime) -> Result<()> {
131-
println!("Upgrading wasmtime in lib/Cargo.toml");
135+
println!("Upgrading wasmtime for Rust");
132136
update_cargo(&args.version)?;
133137

134-
println!("Upgrading wasmtime in build.zig.zon");
138+
println!("Upgrading wasmtime for Zig");
135139
update_zig(&args.version)?;
136140

137141
let repo = Repository::open(".")?;

0 commit comments

Comments
 (0)