Updated how version is calculated in the build script.