gha-utils 4.4.3__tar.gz → 4.4.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.
Potentially problematic release.
This version of gha-utils might be problematic. Click here for more details.
- {gha_utils-4.4.3 → gha_utils-4.4.4}/PKG-INFO +1 -1
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/__init__.py +1 -1
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/changelog.py +8 -7
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/PKG-INFO +1 -1
- {gha_utils-4.4.3 → gha_utils-4.4.4}/pyproject.toml +2 -2
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/__main__.py +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/cli.py +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/mailmap.py +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/metadata.py +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils/py.typed +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/SOURCES.txt +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/dependency_links.txt +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/entry_points.txt +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/requires.txt +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/gha_utils.egg-info/top_level.txt +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/readme.md +0 -0
- {gha_utils-4.4.3 → gha_utils-4.4.4}/setup.cfg +0 -0
|
@@ -108,18 +108,19 @@ class Changelog:
|
|
|
108
108
|
|
|
109
109
|
assert current_version in self.content
|
|
110
110
|
|
|
111
|
-
#
|
|
111
|
+
# Extract parts of the changelog or set default values.
|
|
112
112
|
SECTION_START = "##"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
)
|
|
113
|
+
sections = self.content.split(SECTION_START, 2)
|
|
114
|
+
changelog_header = sections[0] if len(sections) > 0 else "# Changelog\n\n"
|
|
115
|
+
recent_entry = sections[1] if len(sections) > 1 else ""
|
|
116
|
+
past_entries = sections[2] if len(sections) > 2 else ""
|
|
116
117
|
|
|
117
118
|
# Derive the release template from the last entry.
|
|
118
119
|
DATE_REGEX = r"\d{4}\-\d{2}\-\d{2}"
|
|
119
120
|
VERSION_REGEX = r"\d+\.\d+\.\d+"
|
|
120
121
|
|
|
121
122
|
# Replace the release date with the unreleased tag.
|
|
122
|
-
new_entry = re.sub(DATE_REGEX, "unreleased",
|
|
123
|
+
new_entry = re.sub(DATE_REGEX, "unreleased", recent_entry, count=1)
|
|
123
124
|
|
|
124
125
|
# Update GitHub's comparison URL to target the main branch.
|
|
125
126
|
new_entry = re.sub(
|
|
@@ -135,7 +136,7 @@ class Changelog:
|
|
|
135
136
|
new_entry = re.sub(
|
|
136
137
|
r"\n\n.*",
|
|
137
138
|
"\n\n"
|
|
138
|
-
">
|
|
139
|
+
"> \\[!IMPORTANT\\]\n"
|
|
139
140
|
"> This version is not released yet and is under active development.\n\n",
|
|
140
141
|
new_entry,
|
|
141
142
|
flags=re.MULTILINE | re.DOTALL,
|
|
@@ -143,7 +144,7 @@ class Changelog:
|
|
|
143
144
|
|
|
144
145
|
# Prefix entries with section marker.
|
|
145
146
|
new_entry = f"{SECTION_START}{new_entry}"
|
|
146
|
-
history = f"{SECTION_START}{
|
|
147
|
+
history = f"{SECTION_START}{recent_entry}{SECTION_START}{past_entries}"
|
|
147
148
|
|
|
148
149
|
logging.info("New generated section:\n" + indent(new_entry, " " * 2))
|
|
149
150
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
# Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
|
|
3
3
|
name = "gha-utils"
|
|
4
|
-
version = "4.4.
|
|
4
|
+
version = "4.4.4"
|
|
5
5
|
# Python versions and their status: https://devguide.python.org/versions/
|
|
6
6
|
requires-python = ">= 3.9"
|
|
7
7
|
description = "⚙️ CLI helpers for GitHub Actions + reuseable workflows"
|
|
@@ -106,7 +106,7 @@ warn_unreachable = true
|
|
|
106
106
|
pretty = true
|
|
107
107
|
|
|
108
108
|
[tool.bumpversion]
|
|
109
|
-
current_version = "4.4.
|
|
109
|
+
current_version = "4.4.4"
|
|
110
110
|
allow_dirty = true
|
|
111
111
|
ignore_missing_files = true
|
|
112
112
|
|
|
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
|