Split out build script to common