Skip to content

Commit 61cbc39

Browse files
committed
Revert "Add git commit suffix to __version__ for development installs (#5967)"
1 parent efe1a67 commit 61cbc39

File tree

6 files changed

+12
-26
lines changed

6 files changed

+12
-26
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,3 @@ ENV/
9494

9595
# pyright
9696
pyrightconfig.json
97-
98-
# Versioning
99-
beets/_version.py

beets/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
import confuse
1919

20-
# Version management using poetry-dynamic-versioning
21-
from ._version import __version__, __version_tuple__
2220
from .util import deprecate_imports
2321

22+
__version__ = "2.5.0"
2423
__author__ = "Adrian Sampson <adrian@radbox.org>"
2524

2625

@@ -55,6 +54,3 @@ def read(self, user=True, defaults=True):
5554

5655

5756
config = IncludeLazyConfig("beets", __name__)
58-
59-
60-
__all__ = ["__version__", "__version_tuple__", "config"]

beets/_version.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ For packagers:
2222

2323
- Fixed issue with legacy metadata plugins not copying properties from the base
2424
class.
25+
- Reverted the following: When installing ``beets`` via git or locally the
26+
version string now reflects the current git branch and commit hash.
27+
:bug:`6089`
2528

2629
Other changes:
2730

extra/release.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ def update_changelog(text: str, new: Version) -> str:
186186
PYPROJECT,
187187
lambda text, new: re.sub(r"(?<=\nversion = )[^\n]+", f'"{new}"', text),
188188
),
189+
(
190+
BASE / "beets" / "__init__.py",
191+
lambda text, new: re.sub(
192+
r"(?<=__version__ = )[^\n]+", f'"{new}"', text
193+
),
194+
),
189195
(CHANGELOG, update_changelog),
190196
(BASE / "docs" / "conf.py", update_docs_config),
191197
]

pyproject.toml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,9 @@ web = ["flask", "flask-cors"]
158158
[tool.poetry.scripts]
159159
beet = "beets.ui:main"
160160

161-
162-
[tool.poetry-dynamic-versioning]
163-
enable = true
164-
vcs = "git"
165-
format = "{base}.dev{distance}+{commit}"
166-
167-
[tool.poetry-dynamic-versioning.files."beets/_version.py"]
168-
persistent-substitution = true
169-
170161
[build-system]
171-
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
172-
build-backend = "poetry_dynamic_versioning.backend"
162+
requires = ["poetry-core>=1.0.0"]
163+
build-backend = "poetry.core.masonry.api"
173164

174165
[tool.pipx-install]
175166
poethepoet = ">=0.26"

0 commit comments

Comments
 (0)