Use 'git describe' for version numbering. This utilizes repo tags and should simplify things.