Skip to content

Commit 2ae37d2

Browse files
committed
chore: Preserve changeset directory
1 parent 6a87e41 commit 2ae37d2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/.gitkeep

Whitespace-only changes.

tools/swc-releaser/src/main.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,18 @@ fn run_bump(workspace_dir: &Path, dry_run: bool) -> Result<()> {
7777
.with_context(|| format!("failed to set version for {pkg_name}"))?;
7878
}
7979

80+
// Remove changeset files
8081
{
8182
eprintln!("Removing changeset files... ");
8283
if !dry_run {
83-
std::fs::remove_dir_all(&changeset_dir).context("failed to remove changeset files")?;
84+
for file in std::fs::read_dir(&changeset_dir)? {
85+
let file = file?;
86+
if file.file_type()?.is_file()
87+
&& file.path().extension().unwrap_or_default() == "md"
88+
{
89+
std::fs::remove_file(file.path())?;
90+
}
91+
}
8492
}
8593
}
8694

0 commit comments

Comments
 (0)