Skip to content

Commit

Permalink
(fix): string business
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Nov 18, 2024
1 parent f7bf28c commit e8dd9bb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ci/scripts/towncrier_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ def main(argv: Sequence[str] | None = None) -> None:
if Version(args.version).micro != 0 and not re.fullmatch(
patch_branch_pattern, base_branch
):
msg = f"Version {args.version} is a patch release, but "
"you are trying to release from a non-patch release branch: {base_branch}."
msg = (
f"Version {args.version} is a patch release, but "
f"you are trying to release from a non-patch release branch: {base_branch}."
)
raise NoPatchReleaseOnMainError(msg)
if Version(args.version).micro == 0 and base_branch != "main":
msg = f"Version {args.version} is a minor or major release, "
"but you are trying to release not from main: {base_branch}."
msg = (
f"Version {args.version} is a minor or major release, "
f"but you are trying to release not from main: {base_branch}."
)
raise NoMinorMajorReleaseOffMainError(msg)
pr_description = "" if base_branch == "main" else "@meeseeksdev backport to main"
branch_name = f"release_notes_{args.version}"
Expand Down

0 comments on commit e8dd9bb

Please sign in to comment.