diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index a24e9243244..c2aa84f1d65 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -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")?; Ok(()) @@ -117,3 +123,15 @@ fn bump_crate(pkg_name: &str, change_type: Option<&ChangeType>, dry_run: bool) - 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(()) +}