Skip to content

Commit

Permalink
Slightly better annotations (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyid5416 authored Nov 30, 2024
1 parent 2723c42 commit 31a3d88
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def env(name: str, _def=''):
)


# -BUG: Previous step annotations are being overwritten
def set_annotation(
message: str,
title: str='',
Expand Down
14 changes: 8 additions & 6 deletions src/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@



""" Checks """
# If required inputs missing -> ERROR
# [ERROR] If required inputs missing
if not spec:
set_annotation(
"Required input missing: 'spec'.",
'Input-Error',
'error'
)

# If passed inputs are not supported -> ERROR

# [ERROR] If passed inputs are not supported
supported_spec = (
'.py',
'.spec'
Expand All @@ -30,10 +30,12 @@
'error'
)

# If useful optional arguments missing -> NOTICE

# [WARNING] If useful optional arguments missing
if not upload_exe_with_name:
set_annotation(
"Executable couldn't upload. Provide input for 'upload_exe_with_name', if you want to upload the executable as artifact.",
'No-Upload'
"Executable not uploaded. Provide 'upload_exe_with_name' to upload it as an artifact."
'No-Upload',
'warning'
)

8 changes: 7 additions & 1 deletion src/mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ def get_option_value(option: str):


## ---------------------- Spec options ---------------------- ##
isOptionSet = isSpecType and bool(spec_options)
set_output(
'supported_spec_options',
f'-- {spec_options}' if isSpecType and bool(spec_options) else ""
f'-- {spec_options}' if isOptionSet else ""
)
if isOptionSet:
set_annotation(
f"Custom Spec Options: {spec_options}",
'Pyinstaller Options'
)

0 comments on commit 31a3d88

Please sign in to comment.