bump-version
This skill should be used when the user asks to "bump version", "release a new version", "bump the version", "prepare a release", "update version numbers", "what version should this be", or mentions version bumping, semver analysis, or release preparation.
来源信息
- 仓库
- PaulRBerg/cryptfolio-scripts
- 最近来源活动
- 2026年2月6日 11:25
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 24
- 分支
- 2
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- bump-version
- description
- This skill should be used when the user asks to "bump version", "release a new version", "bump the version", "prepare a release", "update version numbers", "what version should this be", or mentions version bumping, semver analysis, or release preparation.
- version
- 0.1.0
# Bump Version
Analyze changes since the last version tag, determine the correct semver bump, and update all version references in the codebase.
## Workflow
### Step 1: Identify the Latest Version Tag
```bash
git tag --sort=-v:refname | head -1
```
The tag format is `vMAJOR.MINOR.PATCH` (e.g. `v2.1.1`).
### Step 2: Analyze Changes Since the Last Tag
Gather the commit log and diff since the tag:
```bash
git log <tag>..HEAD --oneline
git diff <tag>..HEAD --stat
```
### Step 3: Classify the Semver Bump
Apply [Semantic Versioning](https://semver.org/) rules to the changes:
| Bump | Criteria |
| ------- | -------------------------------------------------------------------------------------------- |
| `patch` | Bug fixes, dependency bumps, formatting, docs, refactors with no behavioral change |
| `minor` | New features, new functions, new chain/token support, non-breaking additions |
| `major` | Breaking changes: renamed/removed public functions, changed function signatures, schema moves |
**Context-specific guidance for this codebase:**
- Adding a new custom function (e.g. `GET_BALANCE_V2`) → **minor**
- Adding a new chain or token to `data.gs` → **minor**
- Renaming or removing an existing custom function → **major**
- Changing the parameters of an existing custom function → **major**
- Fixing a bug in price fetching or balance calculation → **patch**
- Updating RPC URLs, API endpoints, or constants → **patch**
- Reformatting, linting, dependency bumps → **patch**
Present the analysis and proposed version to the user for confirmation before making changes.
### Step 4: Update Version References
After the user confirms the bump, update exactly two locations:
#### 1. `package.json` — `version` field
Update the `"version"` field to the new semver string (without the `v` prefix):
```json
"version": "X.Y.Z"
```
#### 2. `src/cryptfolio.gs` — `VERSION` constant
The `VERSION` constant near line 13 is a monotonically incrementing integer string used by Google Apps Script for library deployment. Increment it by 1 from the current value:
```js
const VERSION = "N"; // increment N by 1
```
This is **not** the semver version. It is a separate deployment counter that always increments by exactly 1 regardless of the semver bump type.
### Step 5: Summary
After updating, display a summary:
```
Version bump: vOLD -> vNEW
package.json: "OLD" -> "NEW"
src/cryptfolio.gs: VERSION "N" -> "N+1"
```
Do **not** create a git tag or commit. The user handles that separately.
在 GitHub 查看