@@ -217,39 +217,6 @@ def _version_to_regex(version: str) -> str:
217
217
return version.replace(".", r"\.").replace("+", r"\+")
218
218
219
219
220
- def normalize_tag(
221
- version: Union[VersionProtocol, str],
222
- tag_format: str,
223
- version_type_cls: Optional[Type[VersionProtocol]] = None,
224
- ) -> str:
225
- """The tag and the software version might be different.
226
-
227
- That's why this function exists.
228
-
229
- Example:
230
- | tag | version (PEP 0440) |
231
- | --- | ------- |
232
- | v0.9.0 | 0.9.0 |
233
- | ver1.0.0 | 1.0.0 |
234
- | ver1.0.0.a0 | 1.0.0a0 |
235
- """
236
- if version_type_cls is None:
237
- version_type_cls = Version
238
- if isinstance(version, str):
239
- version = version_type_cls(version)
240
-
241
- major, minor, patch = version.release
242
- prerelease = ""
243
- # version.pre is needed for mypy check
244
- if version.is_prerelease and version.pre:
245
- prerelease = f"{version.pre[0]}{version.pre[1]}"
246
-
247
- t = Template(tag_format)
248
- return t.safe_substitute(
249
- version=version, major=major, minor=minor, patch=patch, prerelease=prerelease
250
- )
251
-
252
-
253
220
def create_commit_message(
254
221
current_version: Union[Version, str],
255
222
new_version: Union[Version, str],
0 commit comments