reviewtask follows Semantic Versioning 2.0.0 (SemVer) for all releases. This document describes our versioning rules, release process, and usage guidelines.
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backwards compatible manner
- PATCH version when you make backwards compatible bug fixes
1.0.0- Initial stable release1.0.1- Bug fix release1.1.0- New feature release (backwards compatible)2.0.0- Breaking change release
Increment when:
- Removing or changing existing CLI commands or flags
- Changing configuration file format in incompatible ways
- Modifying data storage structure requiring migration
- Changing behavior that could break existing workflows
- Requiring different minimum Go version or dependencies
Examples:
- Removing the
--old-flagoption - Changing
.pr-review/config.jsonschema - Requiring authentication where none was needed before
- Changing default behavior of existing commands
Increment when:
- Adding new CLI commands or subcommands
- Adding new configuration options (with backwards compatibility)
- Adding new features that don't affect existing functionality
- Improving performance significantly
- Adding support for new platforms or environments
Examples:
- Adding
reviewtask exportcommand - Adding new options to existing commands
- Supporting new GitHub API features
- Adding new AI analysis capabilities
- Enhancing output formats
Increment when:
- Fixing bugs without changing functionality
- Improving error messages or documentation
- Updating dependencies for security or stability
- Making internal refactoring that doesn't affect behavior
- Fixing typos or improving help text
Examples:
- Fixing authentication error handling
- Correcting task status updates
- Improving GitHub API error recovery
- Fixing edge cases in task generation
- Use
devfor local development builds - Format:
1.2.3-devor justdev
- Alpha:
1.2.3-alpha.1(early testing) - Beta:
1.2.3-beta.1(feature complete, testing) - Release Candidate:
1.2.3-rc.1(potential final release)
# Show version in version command output
./reviewtask version
# Get just the version number
./scripts/version.sh current
# Show detailed version information
./scripts/version.sh info# Increment patch version (1.0.0 → 1.0.1)
./scripts/version.sh bump patch
# Increment minor version (1.0.1 → 1.1.0)
./scripts/version.sh bump minor
# Increment major version (1.1.0 → 2.0.0)
./scripts/version.sh bump major
# Increment based on PR label
./scripts/version.sh bump-from-pr 123# Set exact version
./scripts/version.sh set 1.2.3# Check current state
./scripts/version.sh info
# Prepare release (dry-run and validation)
./scripts/release.sh prepare patch # or minor/major# Create actual release
./scripts/release.sh release patch # or minor/majorWhen creating or reviewing a PR, add one of these labels:
release:major- For breaking changesrelease:minor- For new featuresrelease:patch- For bug fixes
When the PR is merged to main:
- GitHub Actions detects the release label
- Automatically creates the appropriate version bump
- Builds and publishes the release
- Posts a comment on the PR with release details
- Removes the release label to prevent re-triggering
# Create release based on PR label
./scripts/release.sh release --from-pr 123
# Detect what version would be bumped
./scripts/detect-release-label.sh 123The release process automatically:
- Validates working directory is clean
- Detects version bump type from PR label (if using --from-pr)
- Bumps version using semantic versioning rules
- Creates git tag (
v1.2.3) - Builds cross-platform binaries
- Generates release notes from git commits
- Creates GitHub release
- Uploads distribution packages and checksums
The version is determined in this order:
- Git tags - Exact match for current commit (
git describe --tags --exact-match) - Latest git tag - Most recent tag (
git describe --tags --abbrev=0) - VERSION file - Local version file in repository root
- Default - Falls back to
0.1.0
- Format:
vMAJOR.MINOR.PATCH(e.g.,v1.2.3) - Prefix: Always use
vprefix for git tags - Signing: Tags should be annotated, not lightweight
# Correct tag creation (done automatically by scripts)
git tag -a v1.2.3 -m "Release v1.2.3"
# Incorrect (don't do this manually)
git tag 1.2.3 # missing 'v' prefix
git tag v1.2.3 # lightweight tagVersions are embedded in binaries using Go's -ldflags:
go build -ldflags="
-X main.version=1.2.3
-X main.commitHash=abc1234
-X main.buildDate=2023-12-01T10:00:00Z
" -o reviewtask .$ ./reviewtask version
reviewtask version 1.2.3
Commit: abc1234
Built: 2023-12-01T10:00:00Z
Go version: go1.21.0
OS/Arch: linux/amd64- Use simple descriptive names:
Release v1.2.3 - Avoid creative codenames for consistency
# Release v1.2.3
## Changes
- Feature: Add new task export functionality
- Fix: Resolve authentication timeout issues
- Improvement: Enhance error message clarity
## Installation
[Installation instructions]
## Verification
[Checksum verification instructions]- MINOR and PATCH versions: Always backwards compatible
- MAJOR versions: May introduce breaking changes
- Configuration: Provide migration guides for breaking changes
- Data: Maintain data format compatibility within major versions
- Deprecation Notice: Announce in MINOR release
- Deprecation Period: Minimum 1 major version
- Removal: Only in next MAJOR release
Example:
- v1.5.0: Deprecate
--old-flag(show warning) - v1.6.0-v1.x.x: Continue supporting with warnings
- v2.0.0: Remove
--old-flagcompletely
- Version format validation in scripts
- Build verification for all target platforms
- GitHub Actions workflow validation
- Cross-compilation testing
# Test version operations
./scripts/test_versioning.sh
# Verify cross-platform builds
./scripts/build.sh test
# Check GitHub Actions workflow
gh workflow run release.yml --ref v1.2.3- Always use scripts for version management
- Never manually edit version numbers in code
- Test cross-compilation before releases
- Document breaking changes clearly
- Follow commit message conventions for release notes
- Consider version impact of changes
- Document breaking changes in PR descriptions
- Test version embedding in builds
- Verify backwards compatibility
- Pin to specific versions in production
- Test new versions in development first
- Read release notes for breaking changes
- Verify checksums for downloaded binaries
Version shows as "dev"
# Cause: No git tags or VERSION file
# Solution: Create initial tag or VERSION file
echo "1.0.0" > VERSION
git tag v1.0.0Version bump fails
# Cause: Uncommitted changes
# Solution: Commit or stash changes first
git status
git add .
git commit -m "Prepare for release"Cross-compilation fails
# Cause: Missing dependencies or invalid GOOS/GOARCH
# Solution: Test individual platforms
GOOS=linux GOARCH=amd64 go build .- Check version info:
./scripts/version.sh info - Test build process:
./scripts/build.sh test - Prepare release:
./scripts/release.sh prepare - Report issues: GitHub Issues