chore: replace bump2version with bump-my-version

This commit is contained in:
Jun Chen 2025-01-30 18:26:17 -07:00
parent 9bae38ede6
commit 6b25fdf648
6 changed files with 29 additions and 24 deletions

View File

@ -1,19 +0,0 @@
[bumpversion]
current_version = 3.4.0
commit = True
message = Release v{new_version}
tag = True
sign_tags = True
tag_name = v{new_version}
[bumpversion:file:qutebrowser/__init__.py]
parse = __version__ = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
[bumpversion:file:misc/org.qutebrowser.qutebrowser.appdata.xml]
search = <!-- Add new releases here -->
replace = <!-- Add new releases here -->
<release version="{new_version}" date="{now:%Y-%m-%d}"/>
[bumpversion:file:doc/changelog.asciidoc]
search = (unreleased)
replace = ({now:%Y-%m-%d})

24
.bumpversion.toml Normal file
View File

@ -0,0 +1,24 @@
[tool.bumpversion]
current_version = "3.4.0"
commit = true
message = "Release v{new_version}"
tag = true
sign_tags = true
tag_name = "v{new_version}"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
allow_dirty = true
[[tool.bumpversion.files]]
filename = "qutebrowser/__init__.py"
[[tool.bumpversion.files]]
filename = "misc/org.qutebrowser.qutebrowser.appdata.xml"
search = "<!-- Add new releases here -->"
replace = """<!-- Add new releases here -->
<release version='{new_version}' date='{now:%Y-%m-%d}'/>"""
[[tool.bumpversion.files]]
filename = "doc/changelog.asciidoc"
search = "(unreleased)"
replace = "({now:%Y-%m-%d})"

View File

@ -3,7 +3,7 @@
autocommand==2.2.2
backports.tarfile==1.2.0
build==1.2.2.post1
bump2version==1.0.1
bump-my-version==0.30.1
certifi==2024.12.14
cffi==1.17.1
charset-normalizer==3.4.1

View File

@ -1,7 +1,7 @@
hunter
pympler
github3.py
bump2version
bump-my-version
requests
pyqt-builder
build

View File

@ -86,7 +86,7 @@
"pyinstaller-hooks-contrib": "https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/CHANGELOG.rst",
"pytest-benchmark": "https://pytest-benchmark.readthedocs.io/en/stable/changelog.html",
"docutils": "https://docutils.sourceforge.io/RELEASE-NOTES.html",
"bump2version": "https://github.com/c4urself/bump2version/blob/master/CHANGELOG.md",
"bump-my-version": "https://github.com/callowayproject/bump-my-version/blob/master/CHANGELOG.md",
"six": "https://github.com/benjaminp/six/blob/master/CHANGES",
"altgraph": "https://github.com/ronaldoussoren/altgraph/blob/master/doc/changelog.rst",
"urllib3": "https://github.com/urllib3/urllib3/blob/main/CHANGES.rst",

View File

@ -6,7 +6,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""Update version numbers using bump2version."""
"""Update version numbers using bump-my-version."""
import re
import sys
@ -45,7 +45,7 @@ def bump_version(version_leap="patch"):
version_leap: define the jump between versions
("major", "minor", "patch")
"""
subprocess.run([sys.executable, '-m', 'bumpversion', version_leap],
subprocess.run([sys.executable, '-m', 'bumpversion', 'bump', version_leap],
check=True)