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].versioninpyproject.toml- a regex target using
pattern, or a TOML-style target usingsectionandfield
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>, plusmain,master,develop, andrelease/v<semver>rrt-commit-subject: Conventional Commits such asfeat(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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo_release_tools-0.1.0.tar.gz.
File metadata
- Download URL: repo_release_tools-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
976e6e51c3fd52a5fbfb2aed94e04cdeec348ae9eeaeb7c005034a5e419bbcd3
|
|
| MD5 |
394d8a2ac16677d4f9c203d1c9be3cfe
|
|
| BLAKE2b-256 |
5a0fe427ec8996721d4ee9edf2d00cdcd774d0bb312deb8732d51f487484ce1b
|
Provenance
The following attestation bundles were made for repo_release_tools-0.1.0.tar.gz:
Publisher:
cicd.yml on Anselmoo/repo-release-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_release_tools-0.1.0.tar.gz -
Subject digest:
976e6e51c3fd52a5fbfb2aed94e04cdeec348ae9eeaeb7c005034a5e419bbcd3 - Sigstore transparency entry: 1200052926
- Sigstore integration time:
-
Permalink:
Anselmoo/repo-release-tools@9801f809d46870394e114214dfb8b57975e0d7bf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Anselmoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cicd.yml@9801f809d46870394e114214dfb8b57975e0d7bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file repo_release_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: repo_release_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e6e245dcb8fec779d2758ac5db805090c0ce4b8e294916025b9c503cdfaacff
|
|
| MD5 |
383eae498a641976234c0e8134329a54
|
|
| BLAKE2b-256 |
7327a16c82702b37d22ac41bf36ce45ea14a2f38373729463065939818d4f429
|
Provenance
The following attestation bundles were made for repo_release_tools-0.1.0-py3-none-any.whl:
Publisher:
cicd.yml on Anselmoo/repo-release-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_release_tools-0.1.0-py3-none-any.whl -
Subject digest:
4e6e245dcb8fec779d2758ac5db805090c0ce4b8e294916025b9c503cdfaacff - Sigstore transparency entry: 1200052941
- Sigstore integration time:
-
Permalink:
Anselmoo/repo-release-tools@9801f809d46870394e114214dfb8b57975e0d7bf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Anselmoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cicd.yml@9801f809d46870394e114214dfb8b57975e0d7bf -
Trigger Event:
push
-
Statement type: