- Update release command to use standard semver with v prefix (v0.0.0 format) - Add seamless migration from legacy non-prefixed versions (0.0.x -> v0.0.x) - Document version format in release command instructions - Bump version from 0.0.7 to v0.0.8 in package.json Files modified: - .claude/commands/release.md - package.json 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.5 KiB
Release Command
Review all changes in the repository and create a release with proper commit message, version tag, and push to origin.
Argument: $ARGUMENTS
The argument should be one of:
patch- Bump the patch version (e.g., v0.0.4 -> v0.0.5)minor- Bump the minor version and reset patch to 0 (e.g., v0.0.4 -> v0.1.0)major- Bump the major version and reset minor/patch to 0 (e.g., v0.0.4 -> v1.0.0)
If no argument provided, default to patch.
Version Format
This project uses standard semver with v prefix (e.g., v0.0.8, v1.2.3).
Steps to perform:
-
Read the current version from
package.json(theversionfield)- Strip any existing
vprefix if present (for backward compatibility with old0.0.xformat) - The raw version should be in format: MAJOR.MINOR.PATCH
- Strip any existing
-
Calculate the new version based on the argument:
- Parse the current version (format: MAJOR.MINOR.PATCH)
- If
patch: increment PATCH by 1 - If
minor: increment MINOR by 1, set PATCH to 0 - If
major: increment MAJOR by 1, set MINOR and PATCH to 0
-
Update package.json with the new version (with
vprefix) in all three places:version->vX.Y.Zcustom.chrome.version->vX.Y.Zcustom.firefox.version->vX.Y.Z
-
Review changes using
git statusandgit diff --stat HEAD -
Verify the build before committing:
npm run lint npm run build:chrome npm run build:firefoxIf any step fails, fix issues before proceeding.
-
Compose a commit message following this format:
- First line: 72 chars max, imperative mood summary (e.g., "Release v0.0.8")
- Blank line
- Bullet points describing each significant change
- "Files modified:" section listing affected files
- Footer with Claude Code attribution
-
Stage all changes with
git add -A -
Create the commit with the composed message
-
Create a git tag matching the version (e.g.,
v0.0.8) -
Push to origin with tags:
git push origin main --tags -
Report completion with the new version and commit hash
Important:
- This is a browser extension with separate Chrome and Firefox builds
- All three version fields in package.json must be updated together
- Always verify both Chrome and Firefox builds compile before committing
- Version format is standard semver with
vprefix:vMAJOR.MINOR.PATCH - Legacy versions without
vprefix (e.g.,0.0.7) are automatically upgraded to the new format