Refactor build script to isolate condition.