chore: Run yarn changelog while bumping crates

This commit is contained in:
강동윤 (Donny) 2024-09-19 13:03:20 +09:00
parent c36871a848
commit c6cc9b6588

View File

@ -61,6 +61,12 @@ fn run_bump(workspace_dir: &Path, dry_run: bool) -> Result<()> {
} }
} }
{
// Update changelog
update_changelog().with_context(|| "failed to update changelog")?;
}
commit(dry_run).context("failed to commit")?; commit(dry_run).context("failed to commit")?;
Ok(()) Ok(())
@ -117,3 +123,15 @@ fn bump_crate(pkg_name: &str, change_type: Option<&ChangeType>, dry_run: bool) -
Ok(()) Ok(())
} }
fn update_changelog() -> Result<()> {
// Run `yarn changelog`
let mut cmd = Command::new("yarn");
cmd.arg("changelog");
eprintln!("Running {:?}", cmd);
cmd.status().context("failed to run yarn changelog")?;
Ok(())
}