Migrate build script to the latest one