add function to find latest build TARGET_URL & build id

Add a function to find latest build id & target url recursively