That would print out a lot of info, not just the version number.  I think it's easier to just look at the directory and grabbing the sub-dir name which references the version number.

Only other alternative would be to go back to manually entering the reference.