release.md raw

Release Command

Create a new release with proper version tag and push to all configured remotes.

Argument: $ARGUMENTS

The argument should be one of:

If no argument provided, default to patch.

Steps to perform:

  1. Get the current version from git tags:

` git tag --sort=-v:refname | grep '^v[0-9]' | head -1 ` If no version tags exist, start from v0.0.0.

  1. Calculate the new version based on the argument:

- Parse the current version (format: vMAJOR.MINOR.PATCH) - If major: increment MAJOR by 1, set MINOR and PATCH to 0 - If minor: increment MINOR by 1, set PATCH to 0 - If patch: increment PATCH by 1

  1. Verify the build compiles:

` go build ./... ` If build fails, stop and report the error. Do not proceed with release.

  1. Run tests:

` go test ./... ` If tests fail, stop and report the error. Do not proceed with release.

  1. Review changes using git status and git log --oneline $(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~10)..HEAD
  1. If there are uncommitted changes, compose a commit message following this format:

- First line: 72 chars max, imperative mood summary - Blank line - Bullet points describing each significant change - Footer with Claude Code attribution

  1. Stage and commit changes (if any):

` git add -A git commit -m "<message>" `

  1. Create a git tag with the new version:

` git tag -a <version> -m "Release <version>" `

  1. Get all configured remotes and push to each with tags:

` git remote | while read remote; do git push "$remote" main --tags done `

  1. Report completion with:

- The new version number - The commit hash - List of remotes pushed to - Summary of changes since last release

Important: