move to versioning before build

fixes #1639