Skip to content

Commit

Permalink
USHIFT-2966: ensure the output of git push is in the traceback if the…
Browse files Browse the repository at this point in the history
…re is an error
  • Loading branch information
dhellmann committed Apr 12, 2024
1 parent fcf56a9 commit 3d3c8f6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/release-notes/gen_ec_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,16 @@ def tag_release(tag, sha, buildtime):
check=True,
)
print(f'git push origin {tag}')
subprocess.run(
['git', 'push', 'origin', tag],
cmd = ['git', 'push', 'origin', tag]
completed = subprocess.run(
cmd,
env=env,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
output = completed.stdout.decode('utf-8') if completed.stdout else ''
if completed.returncode != 0:
raise subprocess.CalledProcessError(completed.returncode, cmd, output)


def publish_release(new_release, take_action):
Expand Down

0 comments on commit 3d3c8f6

Please sign in to comment.