prepare-release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese执行流程
Execution Process
步骤 1: 版本重置
Step 1: Version Reset
1.1 获取远程版本
1.1 Fetch Remote Version
bash
git fetch origin mainbash
git fetch origin main1.2 检查哪些插件有修改
1.2 Check Which Plugins Have Modifications
bash
git diff --name-only origin/main -- plugins/根据输出判断哪些插件目录有变更,只有变更的插件才需要更新版本。
bash
git diff --name-only origin/main -- plugins/Determine which plugin directories have changes based on the output. Only plugins with changes need version updates.
1.3 读取生产版本号
1.3 Read Production Version Numbers
获取 origin/main 的 marketplace 版本和有修改的插件版本:
bash
undefinedGet the marketplace version of origin/main and the versions of modified plugins:
bash
undefinedmarketplace 版本
Marketplace version
git show origin/main:.claude-plugin/marketplace.json | jq -r '.metadata.version'
git show origin/main:.claude-plugin/marketplace.json | jq -r '.metadata.version'
指定插件版本
Specified plugin version
git show origin/main:.claude-plugin/marketplace.json | jq -r '.plugins[] | select(.name=="<plugin>") | .version'
undefinedgit show origin/main:.claude-plugin/marketplace.json | jq -r '.plugins[] | select(.name=="<plugin>") | .version'
undefined1.4 计算新版本号
1.4 Calculate New Version Number
将获取的生产版本的 patch 版本 +1。
示例:
- 生产 marketplace: → 重置为
0.1.100.1.11 - 生产 sync: → 重置为
0.1.100.1.11
Increment the patch version of the obtained production version by 1.
Examples:
- Production marketplace: → Reset to
0.1.100.1.11 - Production sync: → Reset to
0.1.100.1.11
1.5 更新版本文件
1.5 Update Version Files
只更新有修改的插件:
-
.claude-plugin/marketplace.json- (总是更新)
metadata.version - 有修改的插件的
version
-
plugins/<name>/.claude-plugin/plugin.json- 只更新有修改的插件
未修改的插件保持原版本不变。
重要:仅在 中注册的插件才参与版本重置。本地开发中但未注册的插件(如 ralph 等)需先从 marketplace.json 删除其条目,或直接忽略。
.claude-plugin/marketplace.jsonOnly update plugins with changes:
-
.claude-plugin/marketplace.json- (always update)
metadata.version - of plugins with changes
version
-
plugins/<name>/.claude-plugin/plugin.json- Only update plugins with changes
Plugins without changes retain their original versions.
Important: Only plugins registered in are involved in version reset. Unregistered plugins in local development (such as ralph, etc.) need to have their entries removed from marketplace.json first, or be ignored directly.
.claude-plugin/marketplace.json步骤 2: 更新 CHANGELOG.md
Step 2: Update CHANGELOG.md
在文件顶部( 标题之后)插入新版本条目。
# ChangelogInsert the new version entry at the top of the file (right after the heading).
# Changelog格式
Format
markdown
undefinedmarkdown
undefined{marketplace_version}
{marketplace_version}
{Plugin Name} ({plugin_version})
{Plugin Name} ({plugin_version})
- Added ...
- Changed ...
- Fixed ...
- Added ...
- Changed ...
- Fixed ...
Marketplace
Marketplace
- Bumped version from {old_marketplace_version} to {new_marketplace_version}
- Updated {plugin} plugin to version {plugin_version}
undefined- Bumped version from {old_marketplace_version} to {new_marketplace_version}
- Updated {plugin} plugin to version {plugin_version}
undefined规则
Rules
- 每个有版本变更的插件一个子章节:
### {Plugin Name} ({plugin_version})- Plugin Name 使用首字母大写 + " Plugin" 后缀,如 、
Sync PluginGit Plugin
- Plugin Name 使用首字母大写 + " Plugin" 后缀,如
- 使用 获取该插件的变更摘要
git log origin/main..HEAD -- plugins/{name}/ - 必须使用英文编写条目(Added/Changed/Fixed/Cleaned up/Updated 等前缀)
- 末尾加 段落,列出 bumped version 和 updated plugins
### Marketplace
- One sub-section for each plugin with version changes:
### {Plugin Name} ({plugin_version})- Plugin Name uses capitalized first letters + " Plugin" suffix, such as ,
Sync PluginGit Plugin
- Plugin Name uses capitalized first letters + " Plugin" suffix, such as
- Use to get the change summary for the plugin
git log origin/main..HEAD -- plugins/{name}/ - Must write entries in English (use prefixes like Added/Changed/Fixed/Cleaned up/Updated, etc.)
- Add a section at the end, listing bumped version and updated plugins
### Marketplace
步骤 3: 更新插件 README 版本历史
Step 3: Update Plugin README Version History
对每个有版本变更的插件:
- 读取其
plugins/{name}/README.md - 检查是否存在 段落
## 版本历史 - 如果存在,在该段落顶部(紧接 之后)插入新条目
## 版本历史
For each plugin with version changes:
- Read its
plugins/{name}/README.md - Check if the (Version History) section exists
## 版本历史 - If it exists, insert the new entry at the top of this section (immediately after )
## 版本历史
格式
Format
markdown
- **v{version}** - {中文摘要,分号分隔}示例:
markdown
- **v0.1.12** - 新增 XXX 命令;修复 YYY 问题;更新 ZZZ 配置仅处理有 段落的 README,没有该段落的跳过。
## 版本历史markdown
- **v{version}** - {Chinese summary, separated by semicolons}Example:
markdown
- **v0.1.12** - Added XXX command; fixed YYY issue; updated ZZZ configurationOnly process READMEs with the section, skip those without it.
## 版本历史步骤 4: 更新根目录 README.md
Step 4: Update Root Directory README.md
更新 表格中有版本变更的插件版本号。
## 插件列表表格格式参考:
markdown
| 插件 | 版本 | 描述 |
| ------- | ----- | ----------------------------------------------------------------- |
| sync | 0.1.12 | 开发环境配置同步插件(...) |仅更新有版本变更的行,其他行保持不变。
Update the version numbers of plugins with version changes in the table.
## Plugin ListTable format reference:
markdown
| Plugin | Version | Description |
| ------- | ----- | ----------------------------------------------------------------- |
| sync | 0.1.12 | Development environment configuration sync plugin (...) |Only update rows with version changes, keep other rows unchanged.
步骤 5: 校验
Step 5: Verification
逐一确认以下位置的版本号一致性:
- 中的
.claude-plugin/marketplace.jsonmetadata.version - 中各插件的
.claude-plugin/marketplace.jsonversion - 中的
plugins/<name>/.claude-plugin/plugin.jsonversion - 顶部条目的版本号
CHANGELOG.md - 根目录 插件列表表格中的版本号
README.md - 各插件 版本历史顶部条目的版本号(如有)
README.md
输出校验结果表格供用户确认:
| 位置 | 插件 | 版本 | 状态 |
| ----------------------------- | ------ | ------ | ---- |
| marketplace.json (metadata) | - | 0.1.16 | ✅ |
| marketplace.json (plugin) | sync | 0.1.12 | ✅ |
| plugin.json | sync | 0.1.12 | ✅ |
| CHANGELOG.md | sync | 0.1.12 | ✅ |
| README.md (root) | sync | 0.1.12 | ✅ |
| README.md (plugin) | sync | 0.1.12 | ✅ |Verify the consistency of version numbers in the following locations one by one:
- in
metadata.version.claude-plugin/marketplace.json - of each plugin in
version.claude-plugin/marketplace.json - in
versionplugins/<name>/.claude-plugin/plugin.json - Version number in the top entry of CHANGELOG.md
- Version number of plugins with changes in the plugin list table in root directory README.md
- Version number in the top entry of the version history in each plugin's README.md (if exists)
Output the verification result table for user confirmation:
| Location | Plugin | Version | Status |
| ----------------------------- | ------ | ------ | ---- |
| marketplace.json (metadata) | - | 0.1.16 | ✅ |
| marketplace.json (plugin) | sync | 0.1.12 | ✅ |
| plugin.json | sync | 0.1.12 | ✅ |
| CHANGELOG.md | sync | 0.1.12 | ✅ |
| README.md (root) | sync | 0.1.12 | ✅ |
| README.md (plugin) | sync | 0.1.12 | ✅ |