setlocalversion: Fix version when built/synced on a tag

If building on a tag we check to make sure the version in the
Makefile matches the tag we're building at. That would be a
string comparison and not an integer comparison. Change the test
accordingly. Right now we'll just see 3.0.8 or 3.0.8-dirty if the
kernel is built on a tag.

Similarly if we're synced to a tag we may have two references to
the same object, 1 in the local repo and one in the remote. Force
the show-ref to only look at tags so we only ever describe on
ref instead of two.

Change-Id: I694947b434db8f95d4c0b9f6e68702c65a1ee281
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed