Skip to content

Commit

Permalink
Raise an exception if there was an error pushing (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyservin authored Aug 7, 2024
1 parent f89dab8 commit 9e0d5da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tailor_distro/manage/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def execute(self, rosdistro_repo, repositories, release_version, dry_run):

click.echo(click.style(f"Pushing source branch '{source_version}'...", fg='green'), err=True)
if not dry_run:
origin.push(source_version)
origin.push(source_version).raise_if_error()

click.echo(click.style(f"Creating release branch '{release_branch_name}' from "
f"'{source_version}'...", fg='green'), err=True)
Expand All @@ -101,15 +101,15 @@ def execute(self, rosdistro_repo, repositories, release_version, dry_run):

click.echo(click.style(f"Pushing release branch '{release_branch_name}'...", fg='green'), err=True)
if not dry_run:
origin.push(release_branch)
origin.push(release_branch).raise_if_error()

if latest_tag:
click.echo(
click.style(f"Pushing latest tag '{latest_tag}'...", fg='green'),
err=True
)
if not dry_run:
origin.push(latest_tag)
origin.push(latest_tag).raise_if_error()

self._update_rosdistro_entry(name, latest_tag, release_branch_name, new_release)

Expand Down

0 comments on commit 9e0d5da

Please sign in to comment.