Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Wendel <[email protected]>
  • Loading branch information
KwadFan committed Nov 2, 2023
1 parent 8fc26bd commit 7da947a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/setup_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main():
print(f"matrix=['foo/bar']", file=gitout)
except Exception as e:
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as gitsum:
gitsum_err_msg(e, gitsum)
gitsum_err_msg(e, gitsum)
else:
try:
# Checks if file exists, else raises error.
Expand All @@ -65,15 +65,16 @@ def err_msg(err):
name = Path(__file__).stem
print(f'{name}: OOOPS, something went wrong!\n{err}')


def gitsum_header_msg(env_var):
print(f'# Setup Matrix:', file=env_var)


def gitsum_err_msg(err, env_var):
gitsum_header_msg(env_var)
print(f'## Error:\n{err}')



# MAIN
if __name__ == "__main__":
main()

0 comments on commit 7da947a

Please sign in to comment.