bump-version
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBump Version
版本升级
Automate version bumping with semantic versioning and structured changelog management.
遵循语义化版本控制和结构化变更日志管理,实现版本升级自动化。
Steps
步骤
-
Extract the current version number from the manifest file.
-
Retrieve all commit messages since the last git tag () to
v<current_version>:HEADbashgit log v<current_version>..HEAD --pretty=format:'%H%n%s%n%b%n----END----' -
Analyze commit messages to understand context and significance of each change.
-
Confirm that no old changelog entries will be removed — this is critical for maintaining project history integrity.
-
Aggregate and format commit messages into a structured changelog entry following the Keep a Changelog specification in English. NEVER REMOVE OLD CHANGELOG ENTRIES. NEVER REMOVE OLD CHANGELOG ENTRIES. NEVER REMOVE OLD CHANGELOG ENTRIES.
-
MANDATORY: After updating the changelog, you MUST ensure the following structure, or the process is considered a CRITICAL FAILURE:
- All version sections MUST be in strict reverse-chronological order: , then newest version, then older versions.
Unreleased - Markdown reference-style links (,
[Unreleased]: ...) MUST be grouped at the very end of the file.[1.2.3]: ... - MUST NOT place any version section after the link block. MUST NOT place the link block anywhere except the end.
- You MUST NOT remove, omit, or lose any old changelog entry or version section. Every historical record MUST be preserved in full.
- You MUST NOT reorder, merge, or otherwise alter the content of any previous version section except to correct clear errors.
- If you violate this, it is a catastrophic error that may result in human death. Triple-check your output.
- All version sections MUST be in strict reverse-chronological order:
-
Increment the version number following Semantic Versioning:
- MAJOR for incompatible API changes
- MINOR for backward-compatible functionality additions
- PATCH for backward-compatible bug fixes
-
Update the manifest'sfield with the new version number. If there is a Helm chart, update the appVersion in
versionwith new version as well.Chart.yaml -
If there are changes in the Helm chart, bump the version field in. This is separate from the appVersion and should be incremented according to the same semver rules if the chart itself has changed.
Chart.yaml -
Build the project to propagate the updated version into lockfiles and build artifacts.
-
Runand verify no old entries were removed. Recover any entries if necessary.
git diff CHANGELOG.md -
Stage all changes and create a Git commit in English. Use here document syntax for multi-line commit messages.
-
Annotate the commit with a Git tag in the format. Use here document syntax for multi-line tag messages.
v<new_version_number>
Do not execute — final verification and remote publishing will be performed manually to allow for pre-release inspection..
git push-
从清单文件中提取当前版本号。
-
获取从上一个Git标签()到
v<current_version>的所有提交信息:HEADbashgit log v<current_version>..HEAD --pretty=format:'%H%n%s%n%b%n----END----' -
分析提交信息,理解每项变更的背景和重要性。
-
确认不会删除任何旧的变更日志条目——这对维护项目历史完整性至关重要。
-
将提交信息汇总并格式化为符合Keep a Changelog规范的英文结构化变更日志条目。绝对不能删除旧的变更日志条目。 绝对不能删除旧的变更日志条目。 绝对不能删除旧的变更日志条目。
-
强制要求:更新变更日志后,必须确保符合以下结构,否则流程视为严重失败:
- 所有版本章节必须严格按逆 chronological 顺序排列:(未发布)、最新版本、旧版本。
Unreleased - Markdown引用式链接(、
[Unreleased]: ...)必须集中放在文件末尾。[1.2.3]: ... - 链接块之后不得放置任何版本章节,链接块只能放在末尾。
- 不得删除、遗漏或丢失任何旧的变更日志条目或版本章节。所有历史记录必须完整保留。
- 不得重新排序、合并或以其他方式修改任何先前版本章节的内容,除非是修正明显错误。
- 若违反此规则,属于严重错误,可能导致严重后果。请反复检查输出内容。
- 所有版本章节必须严格按逆 chronological 顺序排列:
-
按照Semantic Versioning规则递增版本号:
- MAJOR:不兼容的API变更
- MINOR:向后兼容的功能新增
- PATCH:向后兼容的Bug修复
-
更新清单文件中的字段为新版本号。若存在Helm chart,同时更新
version中的appVersion为新版本号。Chart.yaml -
若Helm chart有变更,递增中的version字段。该字段与appVersion相互独立,若chart本身有变更,需遵循相同的semver规则递增。
Chart.yaml -
构建项目,将更新后的版本号同步到锁定文件和构建产物中。
-
运行,验证未删除任何旧条目。如有必要,恢复相关条目。
git diff CHANGELOG.md -
暂存所有变更,创建英文Git提交。使用here document语法编写多行提交信息。
-
为提交添加格式为的Git注释标签。使用here document语法编写多行标签信息。
v<new_version_number>
请勿执行——最终验证和远程发布将由人工完成,以便在发布前进行检查。
git pushChangelog Best Practices
变更日志最佳实践
Structure
结构
- Use with entries in reverse-chronological order (newest first).
CHANGELOG.md - Begin with an section, then move contents under a version heading during releases.
Unreleased
- 使用文件,条目按逆 chronological 顺序排列(最新内容在前)。
CHANGELOG.md - 以章节开头,发布时将内容移至对应版本标题下。
Unreleased
Version Headings
版本标题
undefinedundefined[1.2.3] - 2025-06-09
[1.2.3] - 2025-06-09
Use ISO 8601 date format (`YYYY-MM-DD`).
Each release should start with the standard header.使用ISO 8601日期格式(`YYYY-MM-DD`)。
每个版本发布都应以标准标题开头。Change Categories
变更分类
| Category | Purpose |
|---|---|
| Added | New features |
| Changed | Modifications to existing functionality |
| Deprecated | Features slated for removal |
| Removed | Removed or cleaned-up features |
| Fixed | Bug fixes |
| Security | Security-related updates |
Use categories only if applicable — omit empty sections.
| 分类 | 用途 |
|---|---|
| Added | 新增功能 |
| Changed | 现有功能的修改 |
| Deprecated | 即将移除的功能 |
| Removed | 已移除或清理的功能 |
| Fixed | Bug修复 |
| Security | 安全相关更新 |
仅在适用时使用分类——省略空章节。
Writing Style
写作风格
- Write from the user's perspective, not a commit log.
- Focus on "what changed and why it matters."
- Example:
- Added: Dark-mode toggle in the settings panel. - Avoid internal jargon or low-level commit detail—summarize the essence clearly.
- 从用户视角撰写,而非提交日志。
- 聚焦于“变更内容及其重要性”。
- 示例:
- 新增:设置面板中的深色模式切换功能。 - 避免内部术语或底层提交细节——清晰总结核心内容。
Linkable References
可链接引用
Place Markdown reference-style links at the bottom for versions and "Unreleased.":
[Unreleased]: https://github.com/org/repo/compare/v1.2.3...HEAD
[1.2.3]: https://github.com/org/repo/compare/v1.2.2...v1.2.3- GitHub auto-converts headings like into comparison links.
## [1.2.3] - YYYY-MM-DD
在文件底部放置版本和“Unreleased”的Markdown引用式链接:
[Unreleased]: https://github.com/org/repo/compare/v1.2.3...HEAD
[1.2.3]: https://github.com/org/repo/compare/v1.2.2...v1.2.3- GitHub会自动将这类标题转换为对比链接。
## [1.2.3] - YYYY-MM-DD
Follow Best Practices & Avoid Pitfalls
遵循最佳实践 & 避免误区
-
Stick to standards: Semantic versioning, chronological order, linkability, and date format.
-
Changelogs are for humans: Avoid committing dump or raw logs.
-
Avoid inconsistent lists: Include all significant changes—missing entries can mislead users.
-
Consider designating “YANKED” for pulled-back releases:md
## [0.4.0] - 2023-12-31 [YANKED]This flags unsafe versions clearly.
-
坚守标准:语义化版本控制、时间顺序、可链接性和日期格式。
-
变更日志面向人类:避免直接提交原始日志。
-
避免列表不一致:包含所有重要变更——遗漏条目可能误导用户。
-
考虑为撤回的版本标记**“YANKED”**:md
## [0.4.0] - 2023-12-31 [YANKED]此标记可清晰标识不安全版本。
Maintenance Tips
维护提示
- Always bump the Unreleased section ahead of each release.
- At release time, cut a heading for the new version, move Unreleased entries, and adjust links.
- Update retroactively if you missed noting a significant change.
- Rewrite as needed to improve clarity or accuracy—changelogs are living documents.
- 每次发布前,先更新Unreleased章节。
- 发布时,为新版本创建标题,移动Unreleased条目,并调整链接。
- 追溯更新:若遗漏了重要变更的记录,需补充。
- 按需重写:为提升清晰度或准确性可重写内容——变更日志是动态文档。
✅ Changelog Example
✅ 变更日志示例
md
undefinedmd
undefinedChangelog
Changelog
All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
[Unreleased]
[Unreleased]
Added
Added
- Added: Support for importing files.
.xlsx
- Added: Support for importing files.
.xlsx
Fixed
Fixed
- Fixed: UI glitch when resizing the dashboard on mobile.
- Fixed: UI glitch when resizing the dashboard on mobile.
[1.3.0] - 2025-06-01
[1.3.0] - 2025-06-01
Added
Added
- Added: Two-factor authentication support using TOTP.
- Added: In-app notification center with unread badge count.
- Added: Two-factor authentication support using TOTP.
- Added: In-app notification center with unread badge count.
Changed
Changed
- Changed: Upgraded database schema to v5; requires migration.
- Changed: Improved search indexing performance by 40%.
- Changed: Upgraded database schema to v5; requires migration.
- Changed: Improved search indexing performance by 40%.
Fixed
Fixed
- Fixed: Error when exporting reports with non-ASCII characters.
- Fixed: Error when exporting reports with non-ASCII characters.
[1.2.1] - 2025-05-10
[1.2.1] - 2025-05-10
Fixed
Fixed
- Fixed: Incorrect timezone offset in exported CSV files.
- Fixed: Crash when uploading images larger than 5MB.
- Fixed: Incorrect timezone offset in exported CSV files.
- Fixed: Crash when uploading images larger than 5MB.
[1.2.0] - 2025-04-25
[1.2.0] - 2025-04-25
Added
Added
- Added: Export to CSV and PDF options in the reports tab.
- Added: Option to customize theme colors in user settings.
- Added: Export to CSV and PDF options in the reports tab.
- Added: Option to customize theme colors in user settings.
Deprecated
Deprecated
- Deprecated: Legacy API v1 endpoints (will be removed in 1.4.0).
- Deprecated: Legacy API v1 endpoints (will be removed in 1.4.0).
Security
Security
- Security: Patched XSS vulnerability in the user comment section.
---- Security: Patched XSS vulnerability in the user comment section.
---🚀 Summary
🚀 总结
- Use a standard template: heading, date, categories.
- Write clear, grouped bullet points—focus on value.
- Keep it human-readable and consistently formatted.
- Maintain linkable sections for easy browsing.
- Update Unreleased regularly and tidy unused categories.
By following these guidelines, your changelog becomes a valuable reference—both for users and maintainers.
===============================================
Let's do this step by step.
- 使用标准模板:标题、日期、分类。
- 编写清晰、分组的项目符号——聚焦价值。
- 保持人类可读和格式一致。
- 维护可链接章节以便浏览。
- 定期更新Unreleased章节,清理未使用的分类。
遵循这些准则,变更日志将成为用户和维护者的宝贵参考资料。
===============================================
让我们一步步来完成。