Find out the latest version of Minecraft
mcupdate.tumblr.com, with which you can subscribe to with RSS, seems to reliably report the latest version as the newest post with the title Minecraft [x.x(.x)]
.
EDIT
I'm slightly drunk, and feeling bashy, so here's a command that will return the latest version of Minecraft:
curl -s http://mcupdate.tumblr.com/rss | egrep -o -e 'le>Minecraft [0-9]\.[0-9]\.[0-9]|le>Minecraft [0-9]\.[0-9]' | head -1 | egrep -o -e '[0-9]\.[0-9]\.[0-9]|[0-9]\.[0-9]'