Skip to main content

Config-driven branch and release helpers for Git repositories

Project description

repo-release-tools

repo-release-tools provides a small CLI for branch naming and version bumps in Git repositories. The installed command is rrt.

Install

pip install repo-release-tools

Commands

rrt branch new feat "add parser"
rrt branch rescue fix "recover release work"
rrt bump patch
rrt bump minor --dry-run
rrt bump 1.2.3 --no-changelog

or via uvx:

uvx repo-release-tools branch new feat "add parser"

Configuration

Configure consumer repositories in pyproject.toml:

[tool.rrt]
release_branch = "release/v{version}"
changelog_file = "CHANGELOG.md"
lock_command = ["uv", "lock", "-U"]

[[tool.rrt.version_targets]]
path = "pyproject.toml"
kind = "pep621"

[[tool.rrt.version_targets]]
path = "src/my_package/__init__.py"
pattern = '^(\\s*__version__\\s*=\\s*")([^"]+)(")'

[[tool.rrt.version_targets]]
path = "Cargo.toml"
section = "workspace.package"
field = "version"

Version targets support two modes:

  • kind = "pep621" for [project].version in pyproject.toml
  • a regex target using pattern, or a TOML-style target using section and field

The branch commands are generic. The bump command is config-driven.

pre-commit integration

This repo publishes hooks in .pre-commit-hooks.yaml so other repositories can reuse the naming checks directly.

Example:

repos:
  - repo: https://github.com/Anselmoo/repo-release-tools
    rev: v0.1.0
    hooks:
      - id: rrt-branch-name
      - id: rrt-commit-subject

The hooks enforce:

  • rrt-branch-name: <type>/<kebab-case-description>, plus main, master, develop, and release/v<semver>
  • rrt-commit-subject: Conventional Commits such as feat(cli): add hook checks

GitHub Action

This repo also ships a reusable composite action in action.yml.

Example:

- uses: actions/checkout@v6

- uses: Anselmoo/repo-release-tools@v0.1.0
  with:
    check-branch-name: "true"
    check-commit-subject: "true"

The shared validation logic lives in repo_release_tools.hooks, so the pre-commit hooks and GitHub Action stay in sync.

License

repo-release-tools is released under the MIT License

Built with ❤️ for safe, simple release automation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_release_tools-0.1.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_release_tools-0.1.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file repo_release_tools-0.1.1.tar.gz.

File metadata

  • Download URL: repo_release_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_release_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 83a7a1ad0b3e78043c3e61cc274e13fecc50ace779712d372d71e7d30c4c46b0
MD5 d5cb936f072597147548115269e60d06
BLAKE2b-256 0ca1cbd875b20215c44c1b817fa6182d543ff7cbda93b63448a75c2355d8b98a

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_release_tools-0.1.1.tar.gz:

Publisher: cicd.yml on Anselmoo/repo-release-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_release_tools-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for repo_release_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd4033ec12fad583846b57e6c2199018c32becfc865de946e724b72b9be5d020
MD5 8a074d3aeb5d0b76d1463bf20b613a94
BLAKE2b-256 7fd92bf46d481d1babfb383b16dc2a20b1c7f5d03a1616f0ad9c5b50f6726a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_release_tools-0.1.1-py3-none-any.whl:

Publisher: cicd.yml on Anselmoo/repo-release-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page