feat(pyproject): release v1.7.0 — Python pyproject.toml version bump
Add internal/pyproject package with ReadVersion and WriteVersion for pyproject.toml files. Reads [project].version (PEP 621) first, then falls back to [tool.poetry].version. Section boundaries are detected via TOML's rule that headers always start at the beginning of a line (\n[ pattern), so inline arrays with [ characters don't interfere. Config follows the established multi-value pattern: - python.pyproject_toml: single path (opt-in, no default) - python.pyproject_tomls: list for monorepos (overrides single) - --pyproject flag overrides pyproject_toml and clears pyproject_tomls 100% per-package statement coverage maintained across all 14 packages; FuzzReadVersion and FuzzWriteVersion added per fuzzing guidelines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,12 @@ title: Changelog
|
||||
weight: 50
|
||||
---
|
||||
|
||||
## v1.7.0 — 2026-07-12
|
||||
|
||||
### Added
|
||||
|
||||
- **Python `pyproject.toml` support** — opt-in via `python.pyproject_toml` (single) or `python.pyproject_tomls` (list); reads `[project].version` (PEP 621) first, then `[tool.poetry].version`; original formatting preserved; `--pyproject <path>` CLI flag for one-off overrides
|
||||
|
||||
## v1.6.0 — 2026-07-11
|
||||
|
||||
### Added
|
||||
|
||||
@@ -53,6 +53,14 @@ gradle: # opt-in — omit section t
|
||||
# - "build.gradle"
|
||||
# - "module-a/build.gradle"
|
||||
|
||||
python: # opt-in — omit section to skip
|
||||
# pyproject_toml: "pyproject.toml" # PEP 621 [project].version or [tool.poetry].version
|
||||
|
||||
# Monorepo: list overrides pyproject_toml.
|
||||
# pyproject_tomls:
|
||||
# - "pyproject.toml"
|
||||
# - "packages/cli/pyproject.toml"
|
||||
|
||||
gitlab:
|
||||
url: "https://gitlab.example.com" # or env CI_SERVER_URL
|
||||
token: "" # prefer env GITLAB_TOKEN
|
||||
@@ -128,6 +136,27 @@ node:
|
||||
- "packages/backend/package.json"
|
||||
```
|
||||
|
||||
## Python support
|
||||
|
||||
The `python` section is opt-in — if omitted, no `pyproject.toml` is touched. `releaser` reads `[project].version` (PEP 621) first; if not found it falls back to `[tool.poetry].version`. The original file formatting is preserved on write.
|
||||
|
||||
```yaml
|
||||
python:
|
||||
pyproject_toml: "pyproject.toml"
|
||||
```
|
||||
|
||||
Use `pyproject_tomls` for monorepos:
|
||||
|
||||
```yaml
|
||||
python:
|
||||
pyproject_tomls:
|
||||
- "pyproject.toml"
|
||||
- "packages/cli/pyproject.toml"
|
||||
- "packages/lib/pyproject.toml"
|
||||
```
|
||||
|
||||
The `--pyproject <path>` CLI flag sets a single path and clears `pyproject_tomls`.
|
||||
|
||||
## Gradle support
|
||||
|
||||
The `gradle` section is opt-in — if omitted, no build file is touched. Both Groovy DSL (`version = '1.2.3'`) and Kotlin DSL (`version = "1.2.3"`) are supported; the original quote style is preserved on write.
|
||||
|
||||
@@ -40,6 +40,7 @@ releaser --verbose --dry-run
|
||||
| `--tag-prefix <prefix>` | `""` | Prefix for version tags (e.g. `v` → `v1.2.3`) |
|
||||
| `--pom <path>` | `pom.xml` | Path to pom.xml relative to repo root |
|
||||
| `--gradle <path>` | — | Override `gradle.build_file` from config |
|
||||
| `--pyproject <path>` | — | Override `python.pyproject_toml` from config |
|
||||
| `--changelog-file <path>` | `CHANGELOG.md` | Path to changelog file |
|
||||
| `--release-env-file <path>` | `release.env` | Path for dotenv artifact; pass `""` to disable |
|
||||
| `--no-commit` | false | Update version files but stop before committing |
|
||||
|
||||
Reference in New Issue
Block a user