17 lines
556 B
Plaintext
17 lines
556 B
Plaintext
# Provides git describe tag from yocto root directory
|
|
|
|
EXTERNALSRC = "${@os.path.abspath(os.path.join("${TOPDIR}", os.pardir))}"
|
|
|
|
def get_externalsrc_rev(d):
|
|
import subprocess
|
|
srcdir = d.expand(d.getVar("EXTERNALSRC"))
|
|
#bb.note("external source: %s" % (srcdir))
|
|
rev = subprocess.check_output("cd %s && git describe --tags --dirty " % (srcdir),
|
|
shell=True).strip()
|
|
|
|
rev = rev.decode("utf-8")
|
|
d.setVar('BB_DONT_CACHE', '1')
|
|
return rev
|
|
|
|
EXTERNALSRC_GIT_SRCREV := "${@get_externalsrc_rev(d)}"
|