gitver: allow tag adjustment via GIT_TAGADJUST
authorChris Larson <chris_larson@mentor.com>
Wed, 13 Oct 2010 02:06:25 +0000 (19:06 -0700)
committerChris Larson <chris_larson@mentor.com>
Thu, 14 Oct 2010 00:21:23 +0000 (17:21 -0700)
Example usage:

    GIT_TAGADJUST = "version[1:]"

Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/gitver.bbclass

index b67a017..3edb273 100644 (file)
@@ -6,7 +6,8 @@
 # This is most useful in concert with srctree.bbclass.
 
 
-GITVER = "${@get_git_pv('${S}', d)}"
+GIT_TAGADJUST = "version"
+GITVER = "${@get_git_pv('${S}', d, tagadjust=lambda version:${GIT_TAGADJUST})}"
 
 def get_git_pv(path, d, tagadjust=None):
     import os