|
| 1 | +# Versioning and Release Management |
| 2 | + |
| 3 | +This document describes the versioning strategy and release process for Meshtastic MQTT CLI. |
| 4 | + |
| 5 | +## Versioning Strategy |
| 6 | + |
| 7 | +This project follows [Semantic Versioning 2.0.0](https://semver.org/): |
| 8 | + |
| 9 | +- **MAJOR** version: Incompatible API changes |
| 10 | +- **MINOR** version: New functionality in a backwards compatible manner |
| 11 | +- **PATCH** version: Backwards compatible bug fixes |
| 12 | + |
| 13 | +Current version: **0.1.0** |
| 14 | + |
| 15 | +## Version Files |
| 16 | + |
| 17 | +Version information is stored in: |
| 18 | +- `src/meshtastic_mqtt_cli/__version__.py` - Single source of truth |
| 19 | +- `src/meshtastic_mqtt_cli/__init__.py` - Exports version for package |
| 20 | +- `setup.py` - Reads version from `__version__.py` |
| 21 | + |
| 22 | +## Checking Version |
| 23 | + |
| 24 | +### From Command Line |
| 25 | +```bash |
| 26 | +meshtastic-send --version |
| 27 | +``` |
| 28 | + |
| 29 | +### From Python |
| 30 | +```python |
| 31 | +from meshtastic_mqtt_cli import __version__, __version_info__ |
| 32 | + |
| 33 | +print(__version__) # "0.1.0" |
| 34 | +print(__version_info__) # (0, 1, 0) |
| 35 | +``` |
| 36 | + |
| 37 | +## Bumping Version |
| 38 | + |
| 39 | +Use the provided script to bump version numbers: |
| 40 | + |
| 41 | +```bash |
| 42 | +# Bump patch version (0.1.0 -> 0.1.1) |
| 43 | +python scripts/bump_version.py patch |
| 44 | + |
| 45 | +# Bump minor version (0.1.0 -> 0.2.0) |
| 46 | +python scripts/bump_version.py minor |
| 47 | + |
| 48 | +# Bump major version (0.1.0 -> 1.0.0) |
| 49 | +python scripts/bump_version.py major |
| 50 | + |
| 51 | +# Dry run to see what would change |
| 52 | +python scripts/bump_version.py patch --dry-run |
| 53 | +``` |
| 54 | + |
| 55 | +The script will: |
| 56 | +1. Update `src/meshtastic_mqtt_cli/__version__.py` |
| 57 | +2. Update `CHANGELOG.md` with new version and date |
| 58 | +3. Show next steps for committing and tagging |
| 59 | + |
| 60 | +## Release Process |
| 61 | + |
| 62 | +1. **Update CHANGELOG.md** |
| 63 | + - Document all changes under `[Unreleased]` section |
| 64 | + - Follow [Keep a Changelog](https://keepachangelog.com/) format |
| 65 | + |
| 66 | +2. **Bump Version** |
| 67 | + ```bash |
| 68 | + python scripts/bump_version.py [major|minor|patch] |
| 69 | + ``` |
| 70 | + |
| 71 | +3. **Review Changes** |
| 72 | + ```bash |
| 73 | + git diff |
| 74 | + ``` |
| 75 | + |
| 76 | +4. **Run Tests** |
| 77 | + ```bash |
| 78 | + python -m unittest discover tests -v |
| 79 | + ``` |
| 80 | + |
| 81 | +5. **Commit Changes** |
| 82 | + ```bash |
| 83 | + git commit -am "chore: bump version to X.Y.Z" |
| 84 | + ``` |
| 85 | + |
| 86 | +6. **Create Git Tag** |
| 87 | + ```bash |
| 88 | + git tag vX.Y.Z |
| 89 | + ``` |
| 90 | + |
| 91 | +7. **Push to Repository** |
| 92 | + ```bash |
| 93 | + git push && git push --tags |
| 94 | + ``` |
| 95 | + |
| 96 | +8. **Create GitHub Release** (if using GitHub) |
| 97 | + - Go to repository releases |
| 98 | + - Create new release from tag |
| 99 | + - Copy changelog entries for this version |
| 100 | + - Publish release |
| 101 | + |
| 102 | +## Dependency Management |
| 103 | + |
| 104 | +### Renovate Bot |
| 105 | + |
| 106 | +This project uses [Renovate](https://docs.renovatebot.com/) for automated dependency updates. |
| 107 | + |
| 108 | +**Configuration:** `renovate.json` |
| 109 | + |
| 110 | +**Features:** |
| 111 | +- Automatically creates PRs for dependency updates |
| 112 | +- Runs weekly on Mondays at 6:00 AM |
| 113 | +- Auto-merges minor and patch updates |
| 114 | +- Prioritizes security updates |
| 115 | +- Limits concurrent PRs to avoid spam |
| 116 | + |
| 117 | +**Renovate Settings:** |
| 118 | +- Schedule: Before 6am on Monday |
| 119 | +- Auto-merge: Minor and patch updates |
| 120 | +- PR limit: 5 concurrent, 2 per hour |
| 121 | +- Semantic commits: Enabled |
| 122 | +- Vulnerability alerts: Enabled |
| 123 | + |
| 124 | +### Manual Dependency Updates |
| 125 | + |
| 126 | +To manually update dependencies: |
| 127 | + |
| 128 | +```bash |
| 129 | +# Update all dependencies to latest versions |
| 130 | +pip install --upgrade -r requirements.txt |
| 131 | + |
| 132 | +# Update specific package |
| 133 | +pip install --upgrade paho-mqtt |
| 134 | + |
| 135 | +# Regenerate requirements.txt |
| 136 | +pip freeze > requirements.txt |
| 137 | +``` |
| 138 | + |
| 139 | +### Checking for Outdated Dependencies |
| 140 | + |
| 141 | +```bash |
| 142 | +pip list --outdated |
| 143 | +``` |
| 144 | + |
| 145 | +## Version History |
| 146 | + |
| 147 | +See [CHANGELOG.md](CHANGELOG.md) for detailed version history. |
| 148 | + |
| 149 | +## License |
| 150 | + |
| 151 | +This project is licensed under GPL v3 - see [LICENSE](LICENSE) file. |
0 commit comments