update build script to use corebuild