RavenDB-2491 Integrate script optimization to the build