From c6cc9b65880e5e2aa4fb26157ace45f6e8004c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 19 Sep 2024 13:03:20 +0900 Subject: [PATCH] chore: Run `yarn changelog` while bumping crates --- tools/swc-releaser/src/main.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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(()) +}