mavsdk_drone_show

Versioning Guide

How MAVSDK Drone Show manages versions and releases


πŸš€ Quick Start (Automated Workflow)

For most developers: The versioning is now fully automated! Just follow these simple steps:

1. Write Good Commit Messages

Use Conventional Commits:

feat: add new trajectory smoother        # Bumps minor version
fix: resolve modal centering issue       # Bumps minor version
docs: update installation guide          # No version bump
chore: cleanup deprecated files          # No version bump
feat!: breaking API change               # Bumps major version

2. Create Pull Request

3. Merge to Main

That’s it! When you merge:

Manual Override (if needed)

Go to Actions β†’ Automated Release β†’ Run workflow:


πŸ“‹ Table of Contents


Automated Release System

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Commits   β”‚  Use conventional commit messages
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PR Created β”‚  Bot validates commits & predicts version
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Merge to    β”‚  Triggers automated release workflow
β”‚    main     β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Automated  β”‚  β€’ Analyzes commits
β”‚   Release   β”‚  β€’ Bumps version (major/minor)
β”‚   Workflow  β”‚  β€’ Updates CHANGELOG.md
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β€’ Syncs all files
       β”‚         β€’ Creates git tag
       ↓         β€’ Creates GitHub Release
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Released  β”‚  Version v3.8 is live!
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components

GitHub Actions Workflows:

Automation Scripts:

When Does It Run?

Automatically: When you push/merge to main branch Manually: Actions β†’ Automated Release β†’ Run workflow (for manual override)

Note: Only runs if commits are found (skips doc-only changes)


Commit Message Standard

Format

<type>[optional scope][optional !]: <description>

[optional body]

[optional footer]

Types (for version bumping)

Type Version Impact Example
feat: ↑ Minor (3.7 β†’ 3.8) feat: add trajectory editor
fix: ↑ Minor (3.7 β†’ 3.8) fix: resolve GPS timeout
feat!: ↑ Major (3.7 β†’ 4.0) feat!: breaking API change
fix!: ↑ Major (3.7 β†’ 4.0) fix!: breaking config format
docs: β†’ No change docs: update README
chore: β†’ No change chore: cleanup code
refactor: β†’ No change refactor: restructure code
test: β†’ No change test: add unit tests
style: β†’ No change style: fix formatting
perf: β†’ No change perf: optimize rendering

With Scope (optional)

feat(dashboard): add dark mode toggle
fix(api): resolve timeout issue
docs(install): update Docker instructions

Breaking Changes

Use ! suffix or BREAKING CHANGE: in commit body:

feat!: remove deprecated API endpoints

BREAKING CHANGE: The /v1/legacy endpoint has been removed.
Users must migrate to /v2/api.

Examples (Good)

βœ… feat: add swarm trajectory smoother
βœ… fix: resolve modal centering UX issue
βœ… docs: update installation guide with Docker
βœ… chore: cleanup deprecated files
βœ… feat(dashboard): implement real-time telemetry
βœ… fix(gcs): resolve connection timeout bug
βœ… refactor: restructure component hierarchy

Examples (Bad)

❌ Updated files                 # Too vague, no type
❌ Fixed bug                     # No description
❌ feat added new feature        # Missing colon
❌ FIX: Bug in code              # Uppercase type
❌ feature: new thing            # Wrong type name

Validation

PR validation automatically checks commit messages. Invalid commits will be flagged with suggestions.

Learn more: Conventional Commits


Version Numbering Scheme

MDS uses simple two-part versioning: X.Y

Format: X.Y

Why Not Semantic Versioning (X.Y.Z)?

We chose simple X.Y versioning because:


Single Source of Truth

The project uses a VERSION file as the single source of truth:

/root/mavsdk_drone_show/VERSION

Contents: Just the version number (e.g., 3.6)

Why a VERSION file?


Version Synchronization

The version number must be synchronized across multiple locations:

Automated Synchronization

Use the version_sync.py script to automatically update all locations:

python tools/version_sync.py

What it updates:

  1. Python source (src/__init__.py): __version__ = "3.6"
  2. Frontend package.json (app/dashboard/drone-dashboard/package.json): "version": "3.6"
  3. Frontend version.js (app/dashboard/drone-dashboard/src/version.js): Auto-generated with version + git hash

What it includes:


Manual Versioning (Legacy)

Note: With the new automated workflow, manual versioning is rarely needed. Use this only for:

Step-by-Step Process

1. Update the VERSION File

Edit /root/mavsdk_drone_show/VERSION and change the version number:

echo "3.7" > VERSION

or edit manually in your text editor.

2. Run Version Sync Script

python tools/version_sync.py

Expected output:

============================================================
MAVSDK Drone Show - Version Synchronization
============================================================

πŸ“Œ Current version: 3.7

πŸ“ Updating src/__init__.py...
   βœ… Updated to version 3.7
πŸ“ Updating app/dashboard/drone-dashboard/package.json...
   βœ… Updated to version 3.7
πŸ“ Generating app/dashboard/drone-dashboard/src/version.js...
   βœ… Generated: v3.7 (a1b2c3d) on main-candidate

============================================================
βœ… Version synchronization complete!
============================================================

3. Update CHANGELOG.md

Add a new section at the top of CHANGELOG.md:

## [3.7] - 2025-XX-XX

### Added
- New feature description

### Changed
- What changed

### Fixed
- Bug fixes

4. Rebuild Frontend

cd app/dashboard/drone-dashboard
npm run build
cd ../../..

This ensures the new version.js is bundled into the production build.

5. Commit Changes

git add -A
git commit -m "chore: bump version to 3.7"

Release Workflow

MDS uses a two-branch release workflow:

Branch Strategy

main-candidate  ←  Development & testing
      ↓
    main  ←  Stable releases only

Branches:

Release Process

Phase 1: Development (main-candidate)

  1. Develop features on main-candidate branch
  2. Test thoroughly in SITL environment
  3. Version number can be bumped to next minor version early (e.g., 3.7)
  4. Multiple commits during development

Phase 2: Prepare Release

  1. Ensure all features are complete and tested
  2. Update CHANGELOG.md with all changes
  3. Update VERSION file if not already done
  4. Run python tools/version_sync.py
  5. Rebuild frontend
  6. Commit: git commit -m "chore: prepare release 3.7"

Phase 3: Merge to Main

git checkout main
git merge main-candidate
git push origin main

Phase 4: Create GitHub Release

  1. Go to GitHub β†’ Releases β†’ β€œDraft a new release”
  2. Create a new tag: v3.7
  3. Target: main branch
  4. Release title: Version 3.7
  5. Description: Copy from CHANGELOG.md
  6. Publish release

Version Lock


Where Versions Appear

User-Visible Locations

Location Format Example How Updated
Dashboard Sidebar vX.Y (hash) v3.6 (b4afd70) Auto (from version.js)
README.md X.Y 3.6 Manual
CHANGELOG.md [X.Y] [3.6] Manual
GitHub Releases vX.Y v3.6 Manual (tag)

Developer Locations

Location Format How Updated
VERSION file X.Y Manual
src/__init__.py __version__ = "X.Y" Auto (version_sync.py)
package.json "version": "X.Y" Auto (version_sync.py)
version.js Multiple formats Auto (version_sync.py)

Manual Override

The versioning system supports manual overrides when needed.

When to Override?

How to Override

Simply edit the VERSION file and run the sync script:

echo "3.6-hotfix1" > VERSION
python tools/version_sync.py

Note: Non-standard version formats (with suffixes) work but may affect auto-detection in some tools.


Best Practices

DO

βœ… Always run version_sync.py after changing VERSION

βœ… Update CHANGELOG.md with every version bump

βœ… Test after version bump

βœ… Use meaningful commit messages

βœ… Rebuild frontend after version changes

DON’T

❌ Don’t edit version.js manually

❌ Don’t skip version_sync.py

❌ Don’t bump version for every commit

❌ Don’t merge to main without testing

❌ Don’t create GitHub releases from main-candidate


Examples

Example 1: Minor Feature Release

# Starting from version 3.6

# 1. Update VERSION file
echo "3.7" > VERSION

# 2. Sync versions
python tools/version_sync.py

# 3. Update CHANGELOG.md (manually edit)
# Add section for [3.7] with changes

# 4. Rebuild frontend
cd app/dashboard/drone-dashboard && npm run build && cd ../../..

# 5. Commit
git add -A
git commit -m "chore: bump version to 3.7 with new trajectory features"

# 6. Merge to main (when ready)
git checkout main
git merge main-candidate
git push origin main

# 7. Create GitHub release v3.7

Example 2: Major Version Bump

# Starting from version 3.9

# 1. Major architectural change warrants 4.0
echo "4.0" > VERSION

# 2. Sync versions
python tools/version_sync.py

# 3. Update CHANGELOG.md
# Add [4.0] section with breaking changes

# 4. Rebuild frontend
cd app/dashboard/drone-dashboard && npm run build && cd ../../..

# 5. Commit
git add -A
git commit -m "chore: bump version to 4.0 - major architecture overhaul"

# 6. Follow release workflow

Example 3: Hotfix

# Emergency fix on main branch

# 1. Create hotfix version
echo "3.6" > VERSION  # Keep same version for hotfix

# 2. Make fix in code

# 3. Commit with fix
git add -A
git commit -m "fix: critical safety issue in failsafe module"

# 4. Can optionally create patch release
echo "3.7" > VERSION
python tools/version_sync.py
git add -A
git commit -m "chore: bump to 3.7 for hotfix release"

# 5. Create GitHub release v3.7

Validation

Validate Version Format

Run version_sync.py in validate-only mode:

python tools/version_sync.py --validate-only

Output:

βœ… Version format valid: 3.6

Would update:
  - src/__init__.py
  - app/dashboard/drone-dashboard/package.json
  - app/dashboard/drone-dashboard/src/version.js

Run without --validate-only to apply changes

Troubleshooting

Version not showing in dashboard?

  1. Check version.js exists: app/dashboard/drone-dashboard/src/version.js
  2. Rebuild frontend: cd app/dashboard/drone-dashboard && npm run build
  3. Clear browser cache and reload

Version mismatch across files?

Run version_sync.py again:

python tools/version_sync.py

Git hash showing β€œunknown”?

Ensure you’re in a git repository:

git status

Summary

Quick Reference:

  1. Single Source: VERSION file
  2. Sync Tool: python tools/version_sync.py
  3. Version Format: X.Y (simple two-part)
  4. Release Branch: main (stable releases only)
  5. Development Branch: main-candidate
  6. Manual Override: Supported (edit VERSION file)

Version Bump Checklist:


Questions?

If you have questions about versioning or the release process:


Document Version: 1.0 (November 2025)

Β© 2025 Alireza Ghaderi Licensed under CC BY-NC-SA 4.0