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 e711de2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/release-notes/gen_ec_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,15 @@ def tag_release(tag, sha, buildtime):
check=True,
)
print(f'git push origin {tag}')
subprocess.run(
completed = subprocess.run(
['git', 'push', 'origin', tag],
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):
"""Does the work to tag and publish a release.
Expand Down

0 comments on commit e711de2

Please sign in to comment.