Custom command line variable when build

I need to customize the html output of my haml when doing build.

Is there something like this that I can attach to command line

- if custom1
....

OR

- if custom2
....

then parse the code below each?

Any help? This is similar to this question

Its just for “build”, I have different scenarios required setting some variable

Check out this post on stackoverflow (http://stackoverflow.com/questions/17213713/how-to-repeat-middleman-build-process-with-different-variables). I believe it is what you are trying to do…

Unfortunately I got problem on Windows when using the invoke method by set environment variable:

NoMethodError at /file.html undefined method theme' for #<Middleman::Application:0x21509400> Ruby file.haml: in block in singletonclass, line 31 Web GET localhost/file.html

I know for sure the env variable is there because I do the set theme and saw it.
Help?

Did you manage to solve this?
How are you calling the theme variable? I think it needs to be something like: ENV["theme"]

I just do this

if settings.dist