Closed refi64 closed 8 years ago
Currently, that's how you'd do it: have the user set environment variables. Allowing build.bfg files to define parameters that users can pass is a bit of a pain in the ass, since bfg needs to have parsed the command line already in order to even know where the build.bfg file is. It's fixable, but will require a fair bit of work.
In any case, I'm tracking this in #63 for version 0.3.
Is there a way to pass options to a build script? For instance, say I write a build script, and I want it to behave differently depending on whether or not the user wants to enable a certain feature. How can I have the build script read this somehow?
I noticed
env.getvar
, so I could do something likeenv.getvar('ENABLE_XYZ', '')
. But is there a different way to do it?