version-bumper 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {version_bumper-0.3.3 → version_bumper-0.3.4}/CHANGELOG.md +10 -8
- {version_bumper-0.3.3 → version_bumper-0.3.4}/PKG-INFO +1 -1
- {version_bumper-0.3.3 → version_bumper-0.3.4}/pyproject.toml +1 -1
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-release.yml +5 -9
- version_bumper-0.3.4/taskfiles/helpers/task-release-helper.py +109 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/uv.lock +1 -1
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.cruft.json +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.cruft.json.license +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.github/workflows/ci.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.github/workflows/coverage-badge.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.github/workflows/docs.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.github/workflows/release.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.gitignore +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.pre-commit-config.yaml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.pymarkdown.json +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.pymarkdown.json.license +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.python-versions +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.python-versions.license +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/.shellcheckrc +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/DEV-README.md +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/LICENSES/MIT.txt +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/README.md +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/Taskfile.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/docs/DEV-README.md +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/docs/index.md +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/custom_argparse.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/dev-metrics.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/fail_on_regex_match.sh +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/generate_test_docs.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/latest_pypi_version.sh +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/metrics_cc_filter.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/run-mypy-all-python-versions.sh +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/swap_build_system.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/scripts/venv_runner.sh +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/__init__.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/__main__.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/__init__.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/application_settings.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/config_file.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/config_file_base.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/info_control.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/json_config_file.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/logger_control.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/toml_config_file.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/commands.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/py.typed +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/pyproject.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/version.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-docs.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-env.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-format.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-git.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-lint.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-metrics.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-test.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/Taskfile-version.yml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-docs-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-env-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-format-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-lint-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-metrics-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/taskfiles/helpers/task-version-helper.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/config_1.toml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/config_2.toml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/config_3.toml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/config_4.toml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/conftest.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/good_pyproject.toml +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_app_version.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_commands.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_config_file.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_info_control.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_logger_control.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_main.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_pyproject.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tests/test_version.py +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/tox.ini +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/uv.lock.license +0 -0
- {version_bumper-0.3.3 → version_bumper-0.3.4}/zensical.toml +0 -0
|
@@ -20,17 +20,23 @@ and this project adheres to
|
|
|
20
20
|
|
|
21
21
|
### Fixed
|
|
22
22
|
|
|
23
|
-
## [0.3.
|
|
23
|
+
## [0.3.4] - 2026-12-05
|
|
24
24
|
|
|
25
|
-
###
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- `task release` leaves out the empty Added, Changed or Fixed headings when
|
|
28
|
+
it moves the Unreleased entries into the new version's section, so they no
|
|
29
|
+
longer appear in the changelog or the GitHub release notes. The empty
|
|
30
|
+
headings in the 0.3.1, 0.3.2 and 0.3.3 sections, and in those releases'
|
|
31
|
+
GitHub release notes, are removed.
|
|
32
|
+
|
|
33
|
+
## [0.3.3] - 2026-12-05
|
|
26
34
|
|
|
27
35
|
### Changed
|
|
28
36
|
|
|
29
37
|
- The PyPI project links are Homepage, Documentation, Changelog and Issues,
|
|
30
38
|
replacing three links that all pointed to the GitHub repository.
|
|
31
39
|
|
|
32
|
-
### Fixed
|
|
33
|
-
|
|
34
40
|
## [0.3.2] - 2026-12-05
|
|
35
41
|
|
|
36
42
|
### Added
|
|
@@ -51,8 +57,6 @@ and this project adheres to
|
|
|
51
57
|
coverage floor. The release workflow runs it on the tagged commit before
|
|
52
58
|
publishing.
|
|
53
59
|
|
|
54
|
-
### Changed
|
|
55
|
-
|
|
56
60
|
### Fixed
|
|
57
61
|
|
|
58
62
|
- `task docs:build` only worked in a shell with the project's virtual
|
|
@@ -79,8 +83,6 @@ and this project adheres to
|
|
|
79
83
|
under every supported Python, builds, publishes to PyPI and creates the
|
|
80
84
|
GitHub release. It can also be run by hand for an existing tag.
|
|
81
85
|
|
|
82
|
-
### Changed
|
|
83
|
-
|
|
84
86
|
### Fixed
|
|
85
87
|
|
|
86
88
|
- Tests failed when a test of `main()` ran earlier in the same pytest worker:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: version_bumper
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Python package version utility to bump a version by parts.
|
|
5
5
|
Project-URL: Homepage, https://github.com/royw/version_bumper
|
|
6
6
|
Project-URL: Documentation, https://royw.github.io/version_bumper/
|
|
@@ -19,7 +19,7 @@ name = "version_bumper"
|
|
|
19
19
|
# TOML type: string
|
|
20
20
|
# The version of the project, as defined in the Version specifier specification.
|
|
21
21
|
# Users SHOULD prefer to specify already-normalized versions
|
|
22
|
-
version = "0.3.
|
|
22
|
+
version = "0.3.4"
|
|
23
23
|
|
|
24
24
|
# TOML type: string
|
|
25
25
|
# The summary description of the project in one line. Tools MAY error if this includes multiple lines.
|
|
@@ -86,15 +86,11 @@ tasks:
|
|
|
86
86
|
- task: :make
|
|
87
87
|
- echo "✅ All tests passed!"
|
|
88
88
|
- echo "📝 Preparing CHANGELOG for release..."
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
sed -i.bak "s/## \[Unreleased\]/## [Unreleased]\n\n### Added\n\n### Changed\n\n### Fixed\n\n## [{{.NEW_VERSION}}] - $TODAY/" CHANGELOG.md
|
|
95
|
-
|
|
96
|
-
rm CHANGELOG.md.bak
|
|
97
|
-
echo "✅ CHANGELOG.md prepared for v{{.NEW_VERSION}}"
|
|
89
|
+
# Move the [Unreleased] entries to a new version section, dropping empty
|
|
90
|
+
# headings, and start a new [Unreleased] section for future development
|
|
91
|
+
- python taskfiles/helpers/task-release-helper.py prepare-changelog
|
|
92
|
+
"{{.NEW_VERSION}}" "$(date +%Y-%m-%d)"
|
|
93
|
+
- echo "✅ CHANGELOG.md prepared for v{{.NEW_VERSION}}"
|
|
98
94
|
- echo "📝 Committing release preparation..."
|
|
99
95
|
- |
|
|
100
96
|
git add pyproject.toml CHANGELOG.md
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 Roy Wright
|
|
3
|
+
#
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
#
|
|
6
|
+
"""Release helpers for go-task Taskfiles.
|
|
7
|
+
|
|
8
|
+
prepare-changelog VERSION DATE [--changelog FILE]
|
|
9
|
+
Move the [Unreleased] section's entries under a new "## [VERSION] - DATE" heading,
|
|
10
|
+
dropping "###" headings that have no entries, and start a new [Unreleased] section
|
|
11
|
+
with empty Added, Changed and Fixed headings.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import sys
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
UNRELEASED = "## [Unreleased]"
|
|
21
|
+
UNRELEASED_TEMPLATE = [UNRELEASED, "", "### Added", "", "### Changed", "", "### Fixed", ""]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _trim_blank_lines(lines: list[str]) -> list[str]:
|
|
25
|
+
"""The lines without leading and trailing blank lines."""
|
|
26
|
+
start = next((i for i, line in enumerate(lines) if line.strip()), len(lines))
|
|
27
|
+
end = len(lines) - next((i for i, line in enumerate(reversed(lines)) if line.strip()), len(lines))
|
|
28
|
+
return lines[start:end]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _blocks(lines: list[str]) -> list[list[str]]:
|
|
32
|
+
"""Split a section body into blocks, each starting at a "###" heading (the first block
|
|
33
|
+
holds any text before the first heading)."""
|
|
34
|
+
blocks: list[list[str]] = [[]]
|
|
35
|
+
for line in lines:
|
|
36
|
+
if line.startswith("### "):
|
|
37
|
+
blocks.append([])
|
|
38
|
+
blocks[-1].append(line)
|
|
39
|
+
return blocks
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _block_lines(block: list[str]) -> list[str]:
|
|
43
|
+
"""A block as its heading (if any), a blank line, and its content; or no lines when it
|
|
44
|
+
has no content."""
|
|
45
|
+
has_heading = bool(block) and block[0].startswith("### ")
|
|
46
|
+
content = _trim_blank_lines(block[1:] if has_heading else block)
|
|
47
|
+
if not content:
|
|
48
|
+
return []
|
|
49
|
+
heading = [block[0], ""] if has_heading else []
|
|
50
|
+
return [*heading, *content, ""]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _without_empty_headings(lines: list[str]) -> list[str]:
|
|
54
|
+
"""The section body without "###" headings that have no entries, blank-line separated."""
|
|
55
|
+
return [line for block in _blocks(lines) for line in _block_lines(block)]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _unreleased_span(lines: list[str]) -> tuple[int, int]:
|
|
59
|
+
"""The line range of the [Unreleased] section body: after its heading, up to the next
|
|
60
|
+
"## " heading."""
|
|
61
|
+
if UNRELEASED not in lines:
|
|
62
|
+
errmsg = f"no {UNRELEASED} section"
|
|
63
|
+
raise ValueError(errmsg)
|
|
64
|
+
start = lines.index(UNRELEASED) + 1
|
|
65
|
+
end = next((i for i in range(start, len(lines)) if lines[i].startswith("## ")), len(lines))
|
|
66
|
+
return start, end
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def prepare_changelog(text: str, version: str, date: str) -> str:
|
|
70
|
+
"""The changelog with the [Unreleased] entries released as VERSION on DATE."""
|
|
71
|
+
lines = text.splitlines()
|
|
72
|
+
if any(line.startswith(f"## [{version}]") for line in lines):
|
|
73
|
+
errmsg = f"there is already a [{version}] section"
|
|
74
|
+
raise ValueError(errmsg)
|
|
75
|
+
start, end = _unreleased_span(lines)
|
|
76
|
+
released = _without_empty_headings(lines[start:end])
|
|
77
|
+
if not released:
|
|
78
|
+
errmsg = f"the {UNRELEASED} section has no entries"
|
|
79
|
+
raise ValueError(errmsg)
|
|
80
|
+
head = lines[: start - 1]
|
|
81
|
+
new_lines = [*head, *UNRELEASED_TEMPLATE, f"## [{version}] - {date}", "", *released, *lines[end:]]
|
|
82
|
+
return "\n".join(new_lines) + "\n"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def cmd_prepare_changelog(args: argparse.Namespace) -> int:
|
|
86
|
+
"""Rewrite the changelog file for the release."""
|
|
87
|
+
path = Path(args.changelog)
|
|
88
|
+
try:
|
|
89
|
+
path.write_text(prepare_changelog(path.read_text(encoding="utf-8"), args.version, args.date), encoding="utf-8")
|
|
90
|
+
except (OSError, ValueError) as ex:
|
|
91
|
+
sys.stderr.write(f"❌ Error: {path}: {ex}\n")
|
|
92
|
+
return 1
|
|
93
|
+
return 0
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def main(argv: list[str]) -> int:
|
|
97
|
+
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
98
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
99
|
+
prepare = sub.add_parser("prepare-changelog")
|
|
100
|
+
prepare.add_argument("version")
|
|
101
|
+
prepare.add_argument("date")
|
|
102
|
+
prepare.add_argument("--changelog", default="CHANGELOG.md")
|
|
103
|
+
prepare.set_defaults(handler=cmd_prepare_changelog)
|
|
104
|
+
args = parser.parse_args(argv)
|
|
105
|
+
return int(args.handler(args))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
if __name__ == "__main__":
|
|
109
|
+
raise SystemExit(main(sys.argv[1:]))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/application_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/config_file_base.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/json_config_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{version_bumper-0.3.3 → version_bumper-0.3.4}/src/version_bumper/clibones/toml_config_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|