Skip to content

Release: check that the tag matches the version in setup.cfg - #217

Open
luizfnsilva wants to merge 1 commit into
pytest-dev:mainfrom
luizfnsilva:check-tag-version
Open

luizfnsilva wants to merge 1 commit into
pytest-dev:mainfrom
luizfnsilva:check-tag-version

Conversation

@luizfnsilva

Copy link
Copy Markdown

2.5.0 was tagged before the version bump (945ec46 declares 2.4.0 in setup.cfg; 16edd49 bumps it
after the tag). Since #202 the Release workflow builds from the release tag, so the same slip
would now build and publish whatever setup.cfg says.

This adds one step before the build: it fails the job when the tag name and the version line in
setup.cfg differ. Nothing else changes; RELEASING.rst already says to bump first.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Maybe setuptools-scm ought to be useful instead

But that needs a maintainers decision

@luizfnsilva

Copy link
Copy Markdown
Author

That makes sense. setuptools-scm could be a good fit if the maintainers want to derive the package version directly from Git.

My proposal is narrower: keep the existing release process and fail early if the tag and the declared package version disagree.

Happy to leave the architectural choice to the maintainers.

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.

2 participants