chore: resolve hotfix updatelog redirect

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2024-11-09 18:55:07 +08:00
parent 5fed7c8629
commit 673679e4fe
6 changed files with 13 additions and 26 deletions
+4 -2
View File
@@ -9,11 +9,13 @@ const nextFile = join(changelogDir, "next.md")
const new_version = process.argv[2]
const majorMinorPatch = new_version.split("-")[0]
const nextContent = readFileSync(nextFile, "utf-8")
writeFileSync(nextFile, nextContent.replaceAll("NEXT_VERSION", new_version))
writeFileSync(nextFile, nextContent.replaceAll("NEXT_VERSION", majorMinorPatch))
// Rename the next.md to the new version
renameSync(nextFile, join(changelogDir, `${new_version}.md`))
renameSync(nextFile, join(changelogDir, `${majorMinorPatch}.md`))
// Replace the NEXT_VERSION in the next.md file with the new version
// Create the new next.md file