Skip to content

Commit 22e0586

Browse files
committed
refactor: delete the release tag on errors
1 parent 391e18a commit 22e0586

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

template/scripts/release.py.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def main(argv: Sequence[str] | None = None) -> int: # noqa: PLR0911, PLR0915
152152
f"Removed release branch {release_branch!r} "
153153
f"and switched back to {base_branch!r}."
154154
)
155+
run(("git", "tag", "-d", release_tag))
156+
print_error(f"Removed release tag {release_tag!r}.")
155157
return 1
156158

157159
print(f"Pushed changes from {release_branch!r} to 'origin/main'.")

0 commit comments

Comments
 (0)