This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
make build- Builds local vitess-releaser binary for developmentmake install- Installs the latest released version from GitHubmake test- Builds and runs a test release command (RC release)go build -o vitess-releaser ./main.go- Manual build command
make lint- Run golangci-lint to check code qualitymake lint-fix- Run golangci-lint and automatically fix issues where possiblemake fmt- Format code using gofumpt and goimports
- Production:
vitess-releaser --date="YYYY-MM-DD" --live --release=XX [--rc=N] [--vtop-release=X.X] - Development/Testing:
vitess-releaser --date="YYYY-MM-DD" --release=XX [--rc=N](uses personal forks)
Set VITESS_RELEASER_GH_TOKEN environment variable with GitHub Personal Access Token (repo and org:read permissions) to avoid PR review bottlenecks.
This is a Go CLI tool for automating Vitess and Vitess Operator releases. The application uses:
- CLI Framework: Cobra for command-line interface
- TUI Framework: Bubbletea with Lipgloss for terminal user interface
- State Management: Context-based state passing throughout the application
main.go: Entry point with version checking and panic recoverygo/cmd/: Command-line interface and flag parsinggo/interactive/: Terminal UI components and menu systemsgo/releaser/: Core release automation logiccode_freeze/: Code freeze preparation taskspre_release/: Pre-release tasks (release notes, PRs)release/: Release execution (tagging, artifacts, milestones)post_release/: Post-release cleanup tasksgithub/: GitHub API interactions (issues, PRs, milestones, releases)git/: Git operations and repository managementslack/: Slack integration for announcements
- Prerequisites: General checks, Slack announcements, blog post drafts
- Code Freeze: Branch creation, milestone management, version bumping
- Pre-Release: Release PR creation, release notes generation
- Release: Tagging, artifact publishing, milestone closing
- Post-Release: Issue closure, cleanup tasks
releaser.State: Global application state passed via contextreleaser.ReleaseInformation: Release metadata for Vitess and VitessOperator- Interactive UI: Menu-driven interface with step tracking
For testing without affecting production repositories:
- Fork
vitessio/vitessand clone tovitess/subdirectory - Fork
planetscale/vitess-operatorand clone tovitess-operator/subdirectory - Create required labels on your Vitess fork:
Component: General,Type: Release,Do Not Merge - Run without
--liveflag to use personal forks
- Current tool version defined in
go/cmd/cmd.goasVERSIONconstant - Vitess version file path:
./go/vt/servenv/version.go(in Vitess repo) - Release branches follow pattern:
release-XX.0for Vitess,release-X.XXfor VitessOperator
- RC Release:
--rc=Nflag for release candidates - GA Release: No RC flag for general availability
- Patch Release: Determined by SNAPSHOT version on release branch
- VitessOperator: Optional parallel release with
--vtop-releaseflag