Update Version Skill
This skill helps you increment the project version in the VERSION file following semantic versioning.
Version File
- •The version is stored in the
VERSIONfile at the project root - •Format:
MAJOR.MINOR.PATCH(e.g.,0.1.0) - •Follows semantic versioning (semver) conventions
Instructions
When this skill is invoked, follow these steps:
- •
Read the current version:
- •Read the
VERSIONfile to get the current version - •Parse it into MAJOR.MINOR.PATCH components
- •Read the
- •
Ask for version bump type:
- •Ask the user which component to increment:
- •Patch (0.1.0 → 0.1.1): Bug fixes and minor changes
- •Minor (0.1.9 → 0.2.0): New features, backwards compatible
- •Major (0.9.9 → 1.0.0): Breaking changes
- •If not specified, default to patch increment
- •Ask the user which component to increment:
- •
Calculate the new version:
- •Patch increment: Increment the patch number (rightmost)
- •If patch is 9, increment minor and reset patch to 0
- •Minor increment: Increment the minor number (middle), reset patch to 0
- •If minor is 9, increment major and reset minor and patch to 0
- •Major increment: Increment the major number (leftmost), reset minor and patch to 0
- •Patch increment: Increment the patch number (rightmost)
- •
Update the VERSION file:
- •Write the new version to the
VERSIONfile - •Keep the trailing newline
- •Write the new version to the
- •
Run the update script:
- •Execute:
make update-version - •This will propagate the version change to other files in the project
- •Execute:
- •
Confirm:
- •Show the user the version change (e.g., "Updated version: 0.1.0 → 0.1.1")
Examples
Patch increment (most common)
code
0.1.0 → 0.1.1 0.1.9 → 0.2.0 (rollover)
Minor increment
code
0.1.5 → 0.2.0 0.9.3 → 1.0.0 (rollover to major)
Major increment
code
0.5.3 → 1.0.0 1.2.9 → 2.0.0
Notes
- •Always maintain the format
MAJOR.MINOR.PATCHwith exactly 3 components - •The
make update-versioncommand updates version references throughout the codebase - •Keep the trailing newline in the VERSION file