If the tag starts with 'v' followed by a number, drop the 'v' prefix. This
will not be done for you if you customize GIT_TAGADJUST.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
# for use in ${PV}, extracted from the ${S} git checkout, assuming it is one.
# This is most useful in concert with srctree.bbclass.
+def git_drop_tag_prefix(version):
+ if re.match("v\d", version):
+ return version[1:]
+ else:
+ return version
-GIT_TAGADJUST = "version"
+GIT_TAGADJUST = "git_drop_tag_prefix(version)"
GITVER = "${@get_git_pv('${S}', d, tagadjust=lambda version:${GIT_TAGADJUST})}"
def get_git_pv(path, d, tagadjust=None):