scripts: version: fix version error when have no tags

Tags may missing if we just clone the branch in some case such as in
travis CI.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
1 file changed