Conditional build script execution?

When I run my project in the IDE the post-build scripts execute. I’d like to prevent that, but the

#if NOT debugBuild
… code…
#endif

produces an error. Is it possible to avoid executing code here at run time?

If I understand your question, you have an IDE script and, within it, would like to test for DubugBuild, right?

You can’t. However, you can set a script to run either as Debug, Final, or Both, so here’s an idea. Create one script that will run during Debug and set a constant within your project to True. Another script, set to run as Final, will set that constant to False. Your subsequent scripts can check the value of that constant.

Just an idea, I haven’t tried this.

If the name of the app contains “debug” then it’s a debug run. You can test for that.

Thanks, Kem, that was the missing piece. I just changed the popup for that script in the IDE to Final and that did the trick.