Skip to content

Release and Versioning

Source of Truth

The repository version source of truth is the root VERSION file.

  • VERSION contains X.Y.Z
  • pyproject.toml [project].version must match VERSION

Do not manually update only one of them.

Bump Version

Use the bump tool to keep both files synchronized:

source .venv/bin/activate
tools/support/bump_version.py --version 0.1.1 --check
tools/support/bump_version.py --version 0.1.1

Release Flow

Use:

source .venv/bin/activate
tools/release/release.py --no-push

What it does:

  1. Ensures you are in Postman-PyPNMApps-API
  2. Ensures branch is main or hot-fix
  3. Ensures worktree is clean
  4. Runs quality gates:
  5. tools/support/bump_version.py --check using current VERSION
  6. tools/sanitize.py --check
  7. pytest -q
  8. Resolves the release version (auto-increment patch from VERSION, unless --version is provided)
  9. Updates VERSION and pyproject.toml
  10. Creates an empty release commit (if needed) and an annotated vX.Y.Z tag
  11. Pushes branch and tag unless --no-push is used
source .venv/bin/activate
tools/sanitize.py --check
pytest -q
tools/support/bump_version.py --version 0.1.1 --check
tools/release/release.py --version 0.1.1 --no-push