Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor: pull project version variable from package metadata #1240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion 1 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ build_command = """
python -m build .
"""
major_on_zero = true
version_variables = ["src/semantic_release/__init__.py:__version__"]
version_toml = ["pyproject.toml:project.version"]

[tool.semantic_release.changelog]
Expand Down
4 changes: 3 additions & 1 deletion 4 src/semantic_release/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

import importlib.metadata

from semantic_release.commit_parser import (
CommitParser,
ParsedCommit,
Expand All @@ -24,7 +26,7 @@
tags_and_versions,
)

__version__ = "9.21.0"
__version__ = importlib.metadata.version(f"python_{__package__}".replace("_", "-"))

__all__ = [
"CommitParser",
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.