Work out the build tag from the build ref given