nemoclaw-maintainer-cut-release-tag
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCut Release Tag
创建发布标签
Bump all version strings, open a release PR, and after merge create annotated semver + tags on .
latestorigin/mainThis skill delegates the version-bump work to (invoked via ). That script updates package.json (root + plugin), blueprint.yaml, installer defaults, docs config, and versioned doc links — then runs the build and tests before opening a PR.
scripts/bump-version.tsnpm run bump:version更新所有版本字符串,打开发布PR,合并后在上创建带注释的semver标签和标签。
origin/mainlatest本技能将版本更新工作委托给(通过调用)。该脚本会更新package.json(根目录及插件)、blueprint.yaml、安装程序默认配置、文档配置和版本化文档链接——随后在打开PR前运行构建和测试。
scripts/bump-version.tsnpm run bump:versionPrerequisites
前提条件
- You must be in the NemoClaw git repository.
- You must have push access to (NVIDIA/NemoClaw).
origin - The nightly E2E suite should have passed before tagging. Check with the user if unsure.
- 你必须处于NemoClaw git仓库中。
- 你必须拥有(NVIDIA/NemoClaw)的推送权限。
origin - 打标签前夜间E2E测试套件应已通过。若不确定,请询问用户。
Step 1: Determine the Current Version
步骤1:确定当前版本
Fetch all tags and find the latest semver tag:
bash
git fetch origin --tags
git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1Parse the major, minor, and patch components from this tag.
拉取所有标签并找到最新的semver标签:
bash
git fetch origin --tags
git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1从该标签中解析主版本号、次版本号和修订版本号组件。
Step 2: Ask the User Which Bump
步骤2:询问用户版本更新类型
Present the options with the patch bump as default:
- Patch (default): — bug fixes, small changes
vX.Y.(Z+1) - Minor: — new features, larger changes
vX.(Y+1).0 - Major: — breaking changes
v(X+1).0.0
Show the concrete version strings. Example prompt:
Current tag:v0.0.2Which version bump?
- Patch →
(default)v0.0.3- Minor →
v0.1.0- Major →
v1.0.0
Wait for the user to confirm before proceeding. If they just say "yes", "go", "do it", or similar, use the patch default.
提供以下选项,默认选择修订版本更新:
- 修订版本(Patch)(默认):—— bug修复、小改动
vX.Y.(Z+1) - 次版本(Minor):—— 新功能、较大改动
vX.(Y+1).0 - 主版本(Major):—— 破坏性变更
v(X+1).0.0
展示具体的版本字符串示例。示例提示:
当前标签:v0.0.2选择哪种版本更新类型?
- 修订版本 →
(默认)v0.0.3- 次版本 →
v0.1.0- 主版本 →
v1.0.0
等待用户确认后再继续。如果用户仅回复“yes”、“开始”、“执行”或类似内容,则使用默认的修订版本更新。
Step 3: Show What's Being Tagged
步骤3:展示待打标签的内容
Show the user the commit that will be tagged and the changelog since the last tag:
bash
git log --oneline origin/main -1
git log --oneline <previous-tag>..origin/mainAsk for confirmation before proceeding.
向用户展示将被打标签的提交记录以及自上一个标签以来的变更日志:
bash
git log --oneline origin/main -1
git log --oneline <previous-tag>..origin/main继续前请用户确认。
Step 4: Run the Version Bump Script
步骤4:运行版本更新脚本
First, preview the plan with :
--dry-runbash
npm run bump:version -- <version-without-v-prefix> --dry-runShow the dry-run output to the user. After confirmation, ask the user which mode they want:
首先,使用预览计划:
--dry-runbash
npm run bump:version -- <version-without-v-prefix> --dry-run向用户展示试运行输出。确认后,询问用户想要使用哪种模式:
Option A: PR mode (default, recommended)
选项A:PR模式(默认,推荐)
bash
npm run bump:version -- <version-without-v-prefix>This will:
- Update all version strings across the repo
- Run the build and tests
- Create a branch and open a release PR against
release/<version>main
In PR mode, tagging is deferred — proceed to Step 5 after the PR merges.
bash
npm run bump:version -- <version-without-v-prefix>该模式会:
- 更新仓库中所有版本字符串
- 运行构建和测试
- 创建分支并针对
release/<version>打开发布PRmain
在PR模式下,打标签操作会延后——PR合并后再进行步骤5。
Option B: Direct mode (no PR)
选项B:直接模式(无PR)
bash
npm run bump:version -- <version-without-v-prefix> --no-create-pr --pushThis will:
- Update all version strings across the repo
- Run the build and tests
- Commit directly on
main - Create annotated and
v<version>tagslatest - Push the commit and both tags to origin
In direct mode, tagging and pushing are handled by the script — skip to Step 6.
If the user wants to skip tests (e.g., they already ran them), add to either mode.
--skip-testsbash
npm run bump:version -- <version-without-v-prefix> --no-create-pr --push该模式会:
- 更新仓库中所有版本字符串
- 运行构建和测试
- 直接在分支提交变更
main - 创建带注释的标签和
v<version>标签latest - 将提交记录和两个标签推送到origin
在直接模式下,脚本会处理打标签和推送操作——跳过步骤5直接进入步骤6。
如果用户想要跳过测试(例如已自行运行过测试),可在任一模式中添加参数。
--skip-testsStep 5: Create and Push Tags (PR mode only, after PR merge)
步骤5:创建并推送标签(仅PR模式,PR合并后)
Skip this step if you used direct mode in Step 4 — the script already tagged and pushed.
Once the release PR is merged into , create the annotated tag, move , and push:
mainlatestbash
git fetch origin main --tags
git tag -a <new-version> origin/main -m "<new-version>"若步骤4中使用了直接模式,则跳过此步骤——脚本已完成打标签和推送操作。
发布PR合并到后,创建带注释的标签,移动标签并推送:
mainlatestbash
git fetch origin main --tags
git tag -a <new-version> origin/main -m "<new-version>"Move the latest tag (delete old, create new)
移动latest标签(删除旧标签,创建新标签)
git tag -d latest 2>/dev/null || true
git tag -a latest origin/main -m "latest"
git tag -d latest 2>/dev/null || true
git tag -a latest origin/main -m "latest"
Push both tags (force-push latest since it moves)
推送两个标签(因latest标签移动,需强制推送)
git push origin <new-version>
git push origin latest --force
undefinedgit push origin <new-version>
git push origin latest --force
undefinedStep 6: Verify
步骤6:验证
bash
git ls-remote --tags origin | grep -E '(<new-version>|latest)'Confirm both tags point to the same commit on the remote.
bash
git ls-remote --tags origin | grep -E '(<new-version>|latest)'确认远程仓库中两个标签指向同一个提交记录。
Important Notes
重要注意事项
- NEVER tag without explicit user confirmation of the version.
- NEVER tag a branch other than .
origin/main - Always use annotated tags (), not lightweight tags.
-a - The tag is a floating tag that always points to the most recent release — it requires
latestto push.--force - The version string passed to should NOT have a
npm run bump:versionprefix (e.g.,v, not0.0.3). The script adds thev0.0.3prefix for tags internally.v
- 未经用户明确确认版本,切勿打标签。
- 切勿为以外的分支打标签。
origin/main - 始终使用带注释的标签(),而非轻量标签。
-a - 是浮动标签,始终指向最新发布版本——推送时需要使用
latest参数。--force - 传递给的版本字符串不应带有
npm run bump:version前缀(例如v,而非0.0.3)。脚本会在内部为标签添加v0.0.3前缀。v