automate version detection in build.py