From c8e556a3ac861cab4a4a7aff1aa2fa51aaca1f42 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 1 Nov 2024 15:08:46 +0800 Subject: [PATCH] fix: md lint Signed-off-by: Innei --- changelog/0.1.2-beta.0.md | 2 +- changelog/next.md | 2 +- changelog/next.template.md | 1 + scripts/apply-changelog.ts | 7 ++++--- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 changelog/next.template.md diff --git a/changelog/0.1.2-beta.0.md b/changelog/0.1.2-beta.0.md index b7bf4f7b5..83fb7a3b5 100644 --- a/changelog/0.1.2-beta.0.md +++ b/changelog/0.1.2-beta.0.md @@ -1,4 +1,4 @@ -# 0.1.2-beta.0 Changelog +# What's new in v0.1.2-beta.0 ## Features diff --git a/changelog/next.md b/changelog/next.md index 878733942..587f19d1e 100644 --- a/changelog/next.md +++ b/changelog/next.md @@ -1 +1 @@ -# NEXT_VERSION Changelog \ No newline at end of file +# What's new in vNEXT_VERSION diff --git a/changelog/next.template.md b/changelog/next.template.md new file mode 100644 index 000000000..587f19d1e --- /dev/null +++ b/changelog/next.template.md @@ -0,0 +1 @@ +# What's new in vNEXT_VERSION diff --git a/scripts/apply-changelog.ts b/scripts/apply-changelog.ts index 38fb1ad20..b86057635 100644 --- a/scripts/apply-changelog.ts +++ b/scripts/apply-changelog.ts @@ -1,5 +1,5 @@ -import { readFileSync, renameSync, writeFileSync } from "node:fs" -import { dirname, join, resolve } from "node:path" +import { copyFileSync, readFileSync, renameSync, writeFileSync } from "node:fs" +import { dirname, join } from "node:path" import { fileURLToPath } from "node:url" const __dirname = dirname(fileURLToPath(import.meta.url)) @@ -17,4 +17,5 @@ renameSync(nextFile, join(changelogDir, `${new_version}.md`)) // Replace the NEXT_VERSION in the next.md file with the new version // Create the new next.md file -writeFileSync(resolve(changelogDir, "next.md"), `# NEXT_VERSION Changelog`) + +copyFileSync(join(changelogDir, "next.template.md"), join(changelogDir, "next.md"))