|
| 1 | +# Semantic Versioning Guide for WigAI |
| 2 | + |
| 3 | +This project uses [Semantic Versioning](https://semver.org/) with automated releases based on conventional commits. |
| 4 | + |
| 5 | +## Commit Message Format |
| 6 | + |
| 7 | +Use the [Conventional Commits](https://conventionalcommits.org/) specification: |
| 8 | + |
| 9 | +``` |
| 10 | +<type>[optional scope]: <description> |
| 11 | +
|
| 12 | +[optional body] |
| 13 | +
|
| 14 | +[optional footer(s)] |
| 15 | +``` |
| 16 | + |
| 17 | +## Commit Types and Version Impact |
| 18 | + |
| 19 | +### PATCH Releases (0.2.0 → 0.2.1) |
| 20 | +Bug fixes that don't break existing functionality: |
| 21 | + |
| 22 | +```bash |
| 23 | +git commit -m "fix: resolve null pointer exception in device controller" |
| 24 | +git commit -m "fix(mcp): handle connection timeout gracefully" |
| 25 | +git commit -m "fix(transport): correct play/pause state synchronization" |
| 26 | +``` |
| 27 | + |
| 28 | +### MINOR Releases (0.2.0 → 0.3.0) |
| 29 | +New features that are backward compatible: |
| 30 | + |
| 31 | +```bash |
| 32 | +git commit -m "feat: add support for scene banking operations" |
| 33 | +git commit -m "feat(mcp): implement new device parameter tool" |
| 34 | +git commit -m "feat(ui): add configuration panel for MCP settings" |
| 35 | +``` |
| 36 | + |
| 37 | +### MAJOR Releases (0.2.0 → 1.0.0) |
| 38 | +Breaking changes that require user intervention: |
| 39 | + |
| 40 | +```bash |
| 41 | +git commit -m "feat!: redesign MCP tool interface for better performance" |
| 42 | + |
| 43 | +# Or with explicit breaking change footer: |
| 44 | +git commit -m "feat: change device API structure |
| 45 | +
|
| 46 | +BREAKING CHANGE: Device.getParameter() now returns Optional<Parameter> instead of Parameter" |
| 47 | +``` |
| 48 | + |
| 49 | +## Common Commit Types |
| 50 | + |
| 51 | +- `fix:` - Bug fixes |
| 52 | +- `feat:` - New features |
| 53 | +- `docs:` - Documentation changes |
| 54 | +- `style:` - Code style changes (formatting, etc.) |
| 55 | +- `refactor:` - Code refactoring without feature changes |
| 56 | +- `test:` - Adding or updating tests |
| 57 | +- `chore:` - Maintenance tasks, dependency updates |
| 58 | +- `perf:` - Performance improvements |
| 59 | +- `ci:` - CI/CD configuration changes |
| 60 | + |
| 61 | +## Scopes (Optional) |
| 62 | + |
| 63 | +Use scopes to indicate the area of change: |
| 64 | + |
| 65 | +- `mcp` - MCP server related changes |
| 66 | +- `transport` - Transport control functionality |
| 67 | +- `device` - Device parameter management |
| 68 | +- `clip` - Clip and scene management |
| 69 | +- `config` - Configuration management |
| 70 | +- `ui` - User interface changes |
| 71 | +- `api` - API changes |
| 72 | + |
| 73 | +## Examples for WigAI |
| 74 | + |
| 75 | +```bash |
| 76 | +# Bug fixes (PATCH) |
| 77 | +git commit -m "fix(mcp): resolve server startup race condition" |
| 78 | +git commit -m "fix(device): handle missing parameter gracefully" |
| 79 | + |
| 80 | +# New features (MINOR) |
| 81 | +git commit -m "feat(transport): add support for tempo changes" |
| 82 | +git commit -m "feat(mcp): implement clip launch tool" |
| 83 | + |
| 84 | +# Breaking changes (MAJOR) |
| 85 | +git commit -m "feat(api)!: change MCP tool response format" |
| 86 | +git commit -m "feat: restructure extension initialization |
| 87 | +
|
| 88 | +BREAKING CHANGE: WigAIExtension constructor now requires McpServerManager parameter" |
| 89 | +``` |
| 90 | + |
| 91 | +## Release Process |
| 92 | + |
| 93 | +1. **Push to main branch** - Triggers automatic analysis |
| 94 | +2. **Semantic Release analyzes commits** - Determines version bump type |
| 95 | +3. **Version update** - Updates `build.gradle.kts` automatically |
| 96 | +4. **Changelog generation** - Updates `CHANGELOG.md` |
| 97 | +5. **GitHub release** - Creates release with artifacts |
| 98 | +6. **Git tag** - Tags the release (e.g., `v0.3.0`) |
| 99 | + |
| 100 | +## No Release Scenarios |
| 101 | + |
| 102 | +These commit types will NOT trigger a release: |
| 103 | + |
| 104 | +```bash |
| 105 | +git commit -m "docs: update README with new features" |
| 106 | +git commit -m "style: fix code formatting" |
| 107 | +git commit -m "ci: update GitHub Actions workflow" |
| 108 | +git commit -m "chore: update dependencies" |
| 109 | +``` |
| 110 | + |
| 111 | +## Manual Release |
| 112 | + |
| 113 | +If needed, you can manually trigger a release using GitHub Actions workflow dispatch, but it's recommended to use the commit-based approach for consistency. |
0 commit comments