How to get git tag + SHA as part of package name #yocto


msg board
 

Hello,
I would like to have the git tag + SHA as part of the package name . I created an anonymous function which uses git ls-remote command however this anonymous function is called multiple times when recipe runs. Is there a way that the command runs only one in the beginning and sets a variable which can be used in whole recipe?
My anonymous function is called multiple times in recipe and the variable PV that it sets in recipe is reset everytime. Any  help is appreciated..thanks

Join yocto@lists.yoctoproject.org to automatically receive all group messages.