[repohooks] Fix bug in pre-upload.py that fails on versions with characters

There was a bug in my previous CL to pre-upload.py which rejected git versions
with characters in them (i.e. 1.7.5.rc3). This change ignores characters at the
end of the version string (thus making the above example 1.7.5).

TEST=Tested with version string 1.7.5.rc3, 1.7.1, and ensured the
     behaviour was as expected.

Change-Id: Ia5fbe6a7dd8ffe888bf45679889f9bd0aa726cb9
1 file changed
tree: f0ab48dd7e31ecd88063da370d7b67c24d3b2527
  1. checkpatch.pl
  2. pre-upload.py