Skip to content

Commit

Permalink
add debug parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Jan 28, 2022
1 parent db19dd1 commit 4fe9bbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
description: 'Whether to check for errors first'
required: false
default: 'true'
debug:
description: 'Whether to enable additional debug output'
required: false
default: 'false'
definition_notebook:
description: 'Path to the definition notebook'
required: false
Expand Down
11 changes: 10 additions & 1 deletion src/build_paclet.wls
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ If[ ! BooleanQ @ check,
Exit[ 1 ]
];

debug = Interpreter[ "Boolean" ][ getInput[ "DEBUG" ] ];
If[ ! BooleanQ @ debug,
print[ "::error::Expected a boolean value for input 'debug' instead of ",
getInput[ "DEBUG" ]
];
Exit[ 1 ]
];

defNB = getInput[ "DEFINITION_NOTEBOOK" ];
If[ ! FileExistsQ @ ExpandFileName @ defNB,
print[ "::error::Definition notebook not found: ", defNB ];
Expand All @@ -39,7 +47,8 @@ result = Block[ { Print = print },
Wolfram`PacletCICD`BuildPaclet[
File @ defNB,
"Preflight" -> check,
"Target" -> target
"Target" -> target,
"Debug" -> debug
]
]

Expand Down

0 comments on commit 4fe9bbc

Please sign in to comment.