feat: update changelog

This commit is contained in:
2026-04-24 03:16:49 +08:00
parent c33ff59e70
commit 0de005cda5
6 changed files with 29 additions and 17 deletions
+7 -7
View File
@@ -34,7 +34,7 @@ parts = version_str.split(".")
parts[-1] = str(int(parts[-1]) + 1)
new_version = ".".join(parts)
print(f"Version: {version_str} {new_version}")
print(f"Version: {version_str} -> {new_version}")
# ─── 3. Read CHANGELOG_DRAFT.md ──────────────────────────────────────────────
changelog_lines = []
@@ -61,7 +61,7 @@ for line in raw:
remaining_lines.append(line)
if not changelog_lines:
print(" No [NEXT] entries found in CHANGELOG_DRAFT.md skipping version bump and release generation.")
print("[INFO] No [NEXT] entries found in CHANGELOG_DRAFT.md -- skipping version bump and release generation.")
exit(0)
print(f"Changelog entries: {len(changelog_lines)}")
@@ -92,11 +92,11 @@ manifest = {
"releases": existing["releases"]
}
with open(VERSION_JSON, "w") as f:
with open(VERSION_JSON, "w", encoding="utf-8") as f:
json.dump(manifest, f, indent="\t")
f.write("\n")
print(f" Written: {VERSION_JSON} (latest={new_version})")
print(f"[OK] Written: {VERSION_JSON} (latest={new_version})")
# ─── 6. Bump version in project.godot ────────────────────────────────────────
with open(PROJECT_GODOT, "r") as f:
@@ -108,10 +108,10 @@ godot_content = re.sub(
godot_content
)
with open(PROJECT_GODOT, "w") as f:
with open(PROJECT_GODOT, "w", encoding="utf-8") as f:
f.write(godot_content)
print(f" Bumped project.godot {new_version}")
print(f"[OK] Bumped project.godot -> {new_version}")
# ─── 7. Clear [NEXT] in CHANGELOG_DRAFT.md ───────────────────────────────────
archived_header = f"## [{new_version}] — {today}\n"
@@ -124,5 +124,5 @@ if remaining_lines:
with open(CHANGELOG_DRAFT, "w", encoding="utf-8") as f:
f.write(new_draft)
print(f" Cleared [NEXT] in {CHANGELOG_DRAFT}, archived as [{new_version}]")
print(f"[OK] Cleared [NEXT] in {CHANGELOG_DRAFT}, archived as [{new_version}]")
print(f"\nDone! Push to patch-release to deploy v{new_version}.")