Conditional extrascript

I was wondering if there is a way to run a library-script (defined in a library.json file) conditionally.

I whish some scripts to be run with certain targets (it should with target ‘build’, but not with target ‘upload’ for example).

I could create a custom command, set some global variable I could check in the python-script itself, but it seems a little scuffed. Is there some way to check the target-type from env or (prefferably) actually conditionally queue the extra-script?

1 Like

Funny how a post can be accepted by thirds. Anyways, took me a few read-overs to get it, but thanks for the answer. This works great!