optimize finding the latest build in branch