Skip to content

fix(ci): scope release-please to pyproject.toml (stop bumping __init__.py sentinel)#82

Merged
pofallon merged 1 commit into
mainfrom
fix/release-please-scope-pyproject
Jul 25, 2026
Merged

fix(ci): scope release-please to pyproject.toml (stop bumping __init__.py sentinel)#82
pofallon merged 1 commit into
mainfrom
fix/release-please-scope-pyproject

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

Problem

The first release PR (#81) showed the python release-type rewriting the fallback sentinel in src/remo_cli/__init__.py:

except PackageNotFoundError:
-    __version__ = "0.0.0-dev"
+    __version__ = "2.3.0"

That line is the "package not installed" sentinel — the real version comes from importlib.metadata (per CLAUDE.md). Bumping it means an un-installed source checkout would falsely report the last-released version, and it'd drift on every release.

Fix

Switch release-type: python → simple and add an explicit extra-files entry so release-please bumps only [project].version in pyproject.toml:

"release-type": "simple",
"extra-files": [{ "type": "toml", "path": "pyproject.toml", "jsonpath": "$.project.version" }]

release-please now updates pyproject.toml + CHANGELOG.md + the manifest, and never touches __init__.py. After this merges, release-please regenerates the open release PR (#81) with the corrected file set — all pre-merge and reviewable.

🤖 Generated with Claude Code

…py sentinel)

The `python` release-type rewrote the PackageNotFoundError *fallback sentinel*
in src/remo_cli/__init__.py (`__version__ = "0.0.0-dev"` -> the release version),
mistaking it for the canonical literal. The real version comes from
importlib.metadata (pyproject); the fallback must stay a dev sentinel or an
un-installed source checkout would falsely report the last-released version.

Switch to release-type `simple` with an explicit extra-files entry that bumps
only `[project].version` in pyproject.toml. release-please now updates
pyproject.toml + CHANGELOG.md + the manifest, and never touches __init__.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HAPB5GA4NVUgKFsVFVJDxN
@pofallon
pofallon merged commit 00e750a into main Jul 25, 2026
9 of 10 checks passed
@pofallon
pofallon deleted the fix/release-please-scope-pyproject branch July 25, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant