一键导入
version-bump
Bump version in Cargo.toml using cargo-version-info bump command
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Bump version in Cargo.toml using cargo-version-info bump command
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create commits following Angular Conventional Commits format with proper scope naming for consistent changelog generation
Prepare a release including version bump, testing, and PR creation
Run tests, linting, and formatting checks for dotenvage
| name | version-bump |
| description | Bump version in Cargo.toml using cargo-version-info bump command |
Use this skill when bumping the version.
Always use cargo version-info bump for version management.
Never use cog bump - it creates local tags which conflict with
the CI workflow that creates tags after tests pass.
# Patch bump: 0.2.4 -> 0.2.5
cargo version-info bump --patch
# Minor bump: 0.2.4 -> 0.3.0
cargo version-info bump --minor
# Major bump: 0.2.4 -> 1.0.0
cargo version-info bump --major
pre_bump_hooks defined in Cargo.toml:
./scripts/sync-npm-version.sh {{version}}[workspace.package] version in Cargo.tomlnpm/package.json versionnpm/dotenvage-napi/Cargo.toml dependency versionpackage.json version[package] sectionCargo.lockadditional_fileschore(version): bump X.Y.Z -> A.B.CThe bump command uses hunk-level selective staging, so it only commits version-related changes. Any other uncommitted work remains unstaged.
Cargo.toml - workspace and package versionsCargo.lock - lockfilenpm/package.json - npm package versionnpm/dotenvage-napi/Cargo.toml - NAPI binding dependencypackage.json - root workspace versioncargo version-info bump --patch (or --minor/--major)# Get version from Cargo.toml
cargo version-info current
# Get computed build version (includes git SHA in dev)
cargo version-info build-version
# Check if version changed since last tag
cargo version-info changed
To see what would change without making changes:
# Check current version
cargo version-info current
# Calculate what next patch would be
cargo version-info next
After running bump, verify the commit includes all version-related files:
git log -1 --oneline
git diff HEAD~1 --stat
git status
Important: Check that all files modified by pre-bump hooks are
included in the commit. If git status shows uncommitted version
changes (from hooks), amend the commit:
git add <missing-files>
git commit --amend --no-edit
Then add those files to additional_files in Cargo.toml to prevent
this in future bumps.
Then push when ready:
git push origin <branch>
The version bump is configured in Cargo.toml:
[package.metadata.version-info]
pre_bump_hooks = [
"./scripts/sync-npm-version.sh {{version}}"
]
additional_files = [
"npm/package.json",
"npm/dotenvage-napi/Cargo.toml",
"package.json"
]
If the version bump fails or files are missing from the commit:
additional_files in Cargo.toml includes all npm
files